public class WebXml extends XmlEncodingBase implements DocumentProperties.Encoding
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ORDER_OTHERS |
Constructor and Description |
---|
WebXml() |
Modifier and Type | Method and Description |
---|---|
void |
addAbsoluteOrdering(java.lang.String fragmentName) |
void |
addAbsoluteOrderingOthers() |
void |
addAfterOrdering(java.lang.String fragmentName) |
void |
addAfterOrderingOthers() |
void |
addBeforeOrdering(java.lang.String fragmentName) |
void |
addBeforeOrderingOthers() |
void |
addContextParam(java.lang.String param,
java.lang.String value) |
void |
addEjbLocalRef(ContextLocalEjb ejbLocalRef) |
void |
addEjbRef(ContextEjb ejbRef) |
void |
addEnvEntry(ContextEnvironment envEntry) |
void |
addErrorPage(ErrorPage errorPage) |
void |
addFilter(FilterDef filter) |
void |
addFilterMapping(FilterMap filterMap) |
void |
addJspPropertyGroup(JspPropertyGroup propertyGroup) |
void |
addListener(java.lang.String className) |
void |
addLocaleEncodingMapping(java.lang.String locale,
java.lang.String encoding) |
void |
addMessageDestination(MessageDestination messageDestination) |
void |
addMessageDestinationRef(MessageDestinationRef messageDestinationRef) |
void |
addMimeMapping(java.lang.String extension,
java.lang.String mimeType) |
void |
addPostConstructMethods(java.lang.String clazz,
java.lang.String method) |
void |
addPreDestroyMethods(java.lang.String clazz,
java.lang.String method) |
void |
addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) |
void |
addResourceRef(ContextResource resourceRef) |
void |
addSecurityConstraint(SecurityConstraint securityConstraint) |
void |
addSecurityRole(java.lang.String securityRole) |
void |
addServiceRef(ContextService serviceRef) |
void |
addServlet(ServletDef servletDef) |
void |
addServletMapping(java.lang.String urlPattern,
java.lang.String servletName) |
void |
addServletMappingDecoded(java.lang.String urlPattern,
java.lang.String servletName) |
void |
addTaglib(java.lang.String uri,
java.lang.String location) |
void |
addWelcomeFile(java.lang.String welcomeFile) |
void |
createAbsoluteOrdering() |
java.util.Set<java.lang.String> |
getAbsoluteOrdering() |
java.util.Set<java.lang.String> |
getAfterOrdering() |
java.util.Set<java.lang.String> |
getBeforeOrdering() |
java.util.Map<java.lang.String,java.lang.String> |
getContextParams() |
boolean |
getDelegate() |
boolean |
getDenyUncoveredHttpMethods() |
java.lang.String |
getDisplayName() |
java.util.Map<java.lang.String,ContextLocalEjb> |
getEjbLocalRefs() |
java.util.Map<java.lang.String,ContextEjb> |
getEjbRefs() |
java.util.Map<java.lang.String,ContextEnvironment> |
getEnvEntries() |
java.util.Map<java.lang.String,ErrorPage> |
getErrorPages() |
java.util.Set<FilterMap> |
getFilterMappings() |
java.util.Map<java.lang.String,FilterDef> |
getFilters() |
java.lang.String |
getJarName() |
JspConfigDescriptor |
getJspConfigDescriptor() |
java.util.Set<JspPropertyGroup> |
getJspPropertyGroups() |
java.util.Set<java.lang.String> |
getListeners() |
java.util.Map<java.lang.String,java.lang.String> |
getLocaleEncodingMappings() |
LoginConfig |
getLoginConfig() |
int |
getMajorVersion() |
java.util.Map<java.lang.String,MessageDestinationRef> |
getMessageDestinationRefs() |
java.util.Map<java.lang.String,MessageDestination> |
getMessageDestinations() |
java.util.Map<java.lang.String,java.lang.String> |
getMimeMappings() |
int |
getMinorVersion() |
java.lang.String |
getName() |
java.util.Map<java.lang.String,java.lang.String> |
getPostConstructMethods() |
java.util.Map<java.lang.String,java.lang.String> |
getPreDestroyMethods() |
java.lang.String |
getPublicId() |
java.util.Map<java.lang.String,ContextResourceEnvRef> |
getResourceEnvRefs() |
java.util.Map<java.lang.String,ContextResource> |
getResourceRefs() |
java.util.Set<SecurityConstraint> |
getSecurityConstraints() |
java.util.Set<java.lang.String> |
getSecurityRoles() |
java.util.Map<java.lang.String,ContextService> |
getServiceRefs() |
java.util.Map<java.lang.String,java.lang.String> |
getServletMappings() |
java.util.Map<java.lang.String,ServletDef> |
getServlets() |
SessionConfig |
getSessionConfig() |
java.util.Map<java.lang.String,java.lang.String> |
getTaglibs() |
java.net.URL |
getURL() |
java.lang.String |
getVersion() |
boolean |
getWebappJar() |
java.util.Set<java.lang.String> |
getWelcomeFiles() |
boolean |
isDistributable() |
boolean |
isMetadataComplete() |
boolean |
isOverridable() |
boolean |
merge(java.util.Set<WebXml> fragments)
Merge the supplied web fragments into this main web.xml.
|
static java.util.Set<WebXml> |
orderWebFragments(WebXml application,
java.util.Map<java.lang.String,WebXml> fragments,
ServletContext servletContext)
Generates the sub-set of the web-fragment.xml files to be processed in
the order that the fragments must be processed as per the rules in the
Servlet spec.
|
void |
setAlwaysAddWelcomeFiles(boolean alwaysAddWelcomeFiles)
When merging from this web.xml, should the welcome files be added to the
target web.xml even if it already contains welcome file definitions.
|
void |
setDelegate(boolean delegate) |
void |
setDenyUncoveredHttpMethods(boolean denyUncoveredHttpMethods) |
void |
setDisplayName(java.lang.String displayName) |
void |
setDistributable(boolean distributable) |
void |
setJarName(java.lang.String jarName) |
void |
setLoginConfig(LoginConfig loginConfig) |
void |
setMetadataComplete(boolean metadataComplete) |
void |
setName(java.lang.String name) |
void |
setOverridable(boolean overridable) |
void |
setPublicId(java.lang.String publicId) |
void |
setReplaceWelcomeFiles(boolean replaceWelcomeFiles)
When merging/parsing web.xml files into this web.xml should the current
set be completely replaced?
|
void |
setSessionConfig(SessionConfig sessionConfig) |
void |
setURL(java.net.URL url) |
void |
setVersion(java.lang.String version)
Set the version for this web.xml file
|
void |
setWebappJar(boolean webappJar) |
java.lang.String |
toString() |
java.lang.String |
toXml()
Generate a web.xml in String form that matches the representation stored
in this object.
|
getEncoding, setEncoding
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setEncoding
protected static final java.lang.String ORDER_OTHERS
public boolean isOverridable()
public void setOverridable(boolean overridable)
public void createAbsoluteOrdering()
public void addAbsoluteOrdering(java.lang.String fragmentName)
public void addAbsoluteOrderingOthers()
public java.util.Set<java.lang.String> getAbsoluteOrdering()
public void addAfterOrdering(java.lang.String fragmentName)
public void addAfterOrderingOthers()
public java.util.Set<java.lang.String> getAfterOrdering()
public void addBeforeOrdering(java.lang.String fragmentName)
public void addBeforeOrderingOthers()
public java.util.Set<java.lang.String> getBeforeOrdering()
public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- Values of null
will be ignoredpublic java.lang.String getPublicId()
public void setPublicId(java.lang.String publicId)
public boolean isMetadataComplete()
public void setMetadataComplete(boolean metadataComplete)
public java.lang.String getName()
public void setName(java.lang.String name)
public int getMajorVersion()
public int getMinorVersion()
public java.lang.String getDisplayName()
public void setDisplayName(java.lang.String displayName)
public boolean isDistributable()
public void setDistributable(boolean distributable)
public boolean getDenyUncoveredHttpMethods()
public void setDenyUncoveredHttpMethods(boolean denyUncoveredHttpMethods)
public void addContextParam(java.lang.String param, java.lang.String value)
public java.util.Map<java.lang.String,java.lang.String> getContextParams()
public void addFilter(FilterDef filter)
public java.util.Map<java.lang.String,FilterDef> getFilters()
public void addFilterMapping(FilterMap filterMap)
public java.util.Set<FilterMap> getFilterMappings()
public void addListener(java.lang.String className)
public java.util.Set<java.lang.String> getListeners()
public void addServlet(ServletDef servletDef)
public java.util.Map<java.lang.String,ServletDef> getServlets()
public void addServletMapping(java.lang.String urlPattern, java.lang.String servletName)
public void addServletMappingDecoded(java.lang.String urlPattern, java.lang.String servletName)
public java.util.Map<java.lang.String,java.lang.String> getServletMappings()
public void setSessionConfig(SessionConfig sessionConfig)
public SessionConfig getSessionConfig()
public void addMimeMapping(java.lang.String extension, java.lang.String mimeType)
public java.util.Map<java.lang.String,java.lang.String> getMimeMappings()
public void setReplaceWelcomeFiles(boolean replaceWelcomeFiles)
public void setAlwaysAddWelcomeFiles(boolean alwaysAddWelcomeFiles)
public void addWelcomeFile(java.lang.String welcomeFile)
public java.util.Set<java.lang.String> getWelcomeFiles()
public void addErrorPage(ErrorPage errorPage)
public java.util.Map<java.lang.String,ErrorPage> getErrorPages()
public void addTaglib(java.lang.String uri, java.lang.String location)
public java.util.Map<java.lang.String,java.lang.String> getTaglibs()
public void addJspPropertyGroup(JspPropertyGroup propertyGroup)
public java.util.Set<JspPropertyGroup> getJspPropertyGroups()
public void addSecurityConstraint(SecurityConstraint securityConstraint)
public java.util.Set<SecurityConstraint> getSecurityConstraints()
public void setLoginConfig(LoginConfig loginConfig)
public LoginConfig getLoginConfig()
public void addSecurityRole(java.lang.String securityRole)
public java.util.Set<java.lang.String> getSecurityRoles()
public void addEnvEntry(ContextEnvironment envEntry)
public java.util.Map<java.lang.String,ContextEnvironment> getEnvEntries()
public void addEjbRef(ContextEjb ejbRef)
public java.util.Map<java.lang.String,ContextEjb> getEjbRefs()
public void addEjbLocalRef(ContextLocalEjb ejbLocalRef)
public java.util.Map<java.lang.String,ContextLocalEjb> getEjbLocalRefs()
public void addServiceRef(ContextService serviceRef)
public java.util.Map<java.lang.String,ContextService> getServiceRefs()
public void addResourceRef(ContextResource resourceRef)
public java.util.Map<java.lang.String,ContextResource> getResourceRefs()
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef)
public java.util.Map<java.lang.String,ContextResourceEnvRef> getResourceEnvRefs()
public void addMessageDestinationRef(MessageDestinationRef messageDestinationRef)
public java.util.Map<java.lang.String,MessageDestinationRef> getMessageDestinationRefs()
public void addMessageDestination(MessageDestination messageDestination)
public java.util.Map<java.lang.String,MessageDestination> getMessageDestinations()
public void addLocaleEncodingMapping(java.lang.String locale, java.lang.String encoding)
public java.util.Map<java.lang.String,java.lang.String> getLocaleEncodingMappings()
public void addPostConstructMethods(java.lang.String clazz, java.lang.String method)
public java.util.Map<java.lang.String,java.lang.String> getPostConstructMethods()
public void addPreDestroyMethods(java.lang.String clazz, java.lang.String method)
public java.util.Map<java.lang.String,java.lang.String> getPreDestroyMethods()
public JspConfigDescriptor getJspConfigDescriptor()
public void setURL(java.net.URL url)
public java.net.URL getURL()
public void setJarName(java.lang.String jarName)
public java.lang.String getJarName()
public void setWebappJar(boolean webappJar)
public boolean getWebappJar()
public boolean getDelegate()
public void setDelegate(boolean delegate)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toXml()
public boolean merge(java.util.Set<WebXml> fragments)
fragments
- The fragments to merge intrue
if merge is successful, else
false
public static java.util.Set<WebXml> orderWebFragments(WebXml application, java.util.Map<java.lang.String,WebXml> fragments, ServletContext servletContext)
application
- The application web.xml filefragments
- The map of fragment names to web fragmentsservletContext
- The servlet context the fragments are associated
withCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.