Package org.apache.myfaces.application
Class FacesServletMapping
java.lang.Object
org.apache.myfaces.application.FacesServletMapping
Represents a mapping entry of the FacesServlet in the web.xml
configuration file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FacesServletMapping
createExactMapping
(String exact) static FacesServletMapping
createExtensionMapping
(String extension) Creates a new FacesServletMapping object using extension mapping.static FacesServletMapping
createPrefixMapping
(String path) Creates a new FacesServletMapping object using prefix mapping.getExact()
Returns the extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping.Returns the path ("/faces", for example) which has been specified in the url-pattern of the FacesServlet mapping.Returns the url-pattern entry for this servlet mapping.boolean
boolean
Indicates whether this mapping is based on an extension (e.g.boolean
Indicates whether this mapping is based on a prefix (e.g.void
void
setExtension
(String extension) Sets the extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping.void
Sets the path ("/faces/", for example) which has been specified in the url-pattern.toString()
-
Constructor Details
-
FacesServletMapping
public FacesServletMapping()
-
-
Method Details
-
createPrefixMapping
Creates a new FacesServletMapping object using prefix mapping.- Parameters:
path
- The path ("/faces", for example) which has been specified in the url-pattern of the FacesServlet mapping.- Returns:
- a newly created FacesServletMapping
-
createExtensionMapping
Creates a new FacesServletMapping object using extension mapping.- Parameters:
extension
- The extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping.- Returns:
- a newly created FacesServletMapping
-
createExactMapping
-
getPrefix
Returns the path ("/faces", for example) which has been specified in the url-pattern of the FacesServlet mapping. If this mapping is based on an extension,null
will be returned. Note that this path is not the same as the specified url-pattern as the trailing "/*" is omitted.- Returns:
- the path which has been specified in the url-pattern
-
setPrefix
Sets the path ("/faces/", for example) which has been specified in the url-pattern.- Parameters:
path
- The path which has been specified in the url-pattern
-
getExtension
Returns the extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping. If this mapping is not based on an extension,null
will be returned.- Returns:
- the extension which has been specified in the url-pattern
-
setExtension
Sets the extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping.- Parameters:
extension
- The extension which has been specified in the url-pattern
-
isExtensionMapping
public boolean isExtensionMapping()Indicates whether this mapping is based on an extension (e.g. ".jsp").- Returns:
true
, if this mapping is based is on an extension,false
otherwise
-
isPrefixMapping
public boolean isPrefixMapping()Indicates whether this mapping is based on a prefix (e.g. /faces/*").- Returns:
true
, if this mapping is based is on a prefix,false
otherwise
-
getUrlPattern
Returns the url-pattern entry for this servlet mapping.- Returns:
- the url-pattern entry for this servlet mapping
-
getExact
-
setExact
-
isExactMapping
public boolean isExactMapping() -
toString
-