JBoss Web Application Deployment Descriptor
Introduction
The jboss-web.xml is an XML file containing
the JBossWeb specific behaviour of a webapp. It replaces
the Tomcat context.xml file.
You need only to use it if you want properties and behaviour
that extent the web.xml of the Servlet 3.0 specifications.
Attributes
Common Attributes
The jboss-web.xml supports the following attributes:
Attribute Description env-entryAn element
env-entryas defined in J2EEejb-refAn element
ejb-refas defined in J2EEejb-local-refAn element
ejb-local-refas defined in J2EEservice-refAn element
service-refas defined in J2EEresource-refAn element
resource-refas defined in J2EEresource-env-refAn element
resource-env-refas defined in J2EEmessage-destination-refAn element
message-destination-refas defined in J2EEpersistence-context-refAn element
persistence-context-refas defined in J2EEpersistence-unit-refAn element
persistence-unit-refas defined in J2EEpost-constructAn element
post-constructas defined in J2EEpre-destroyAn element
pre-destroyas defined in J2EEdata-sourceAn element
data-sourceas defined in J2EEcontext-rootRoot context of the web-app. It defaults to the filename of the deployememt without the .war suffix
virtual-hostName of the
virtual-hostthe application will accept request from.annotationElement describing an
annotationof the webapp.listenerElement describing a
listenerof the webapp.session-configElement describing the
session-configof the webapp.valveElement describing a
valveof the webapp.overlayname of the overlay to add the webapp
security-domainName of the security domain to use for the webapp
security-roleElement describing a
security-roleof the webapp.jacc-star-role-allowNOT YET SUPPORTED: See JBMETA-134
disable-cross-contextPrevent application to call another application context. Default:
true
Nested Components
annotation
annotationdescribes how the annotation of the webapp
Attribute Description class-namename of class of the annotation.
servlet-security
servlet-securityElement (like @ServletSecurity)run-as
servlet-securityElement (like @RunAs)multi-part
servlet-securityElement (like @MultipartConfig)
listener
listenerdescribes a listener of the webapp.
Attribute Description class-namename of class of the listener.
list of
conditionElements. See condition below.listener-typeTell what kind of listener to add to the Context of the webapp:
- CONTAINER: Add a ContainerListener to the Context.
- LIFECYCLE: Add a LifecycleListener to the Context.
- SERVLET_INSTANCE: Add a InstanceListener to the Context.
- SERVLET_CONTAINER: Add a WrapperListener to the Context.
- SERVLET_LIFECYCLE: Add a WrapperLifecycle to the Context.
modulename of the module containing the listener class.
paramA parameter:
param-nameandparam-name
session-config
session-configdescribes the session configuration of the web-app that is like the<session-config>of theweb.xml. It is here for compatibility
valve
valvedescribes a valve of the webapp. Similar to thelistenerhasclass-name,moduleand<param/>
security-role
security-roledescribes a securite role of the web-app that is like the<security-role;of theweb.xml. It is here for compatibility



