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-entry
An element
env-entry
as defined in J2EEejb-ref
An element
ejb-ref
as defined in J2EEejb-local-ref
An element
ejb-local-ref
as defined in J2EEservice-ref
An element
service-ref
as defined in J2EEresource-ref
An element
resource-ref
as defined in J2EEresource-env-ref
An element
resource-env-ref
as defined in J2EEmessage-destination-ref
An element
message-destination-ref
as defined in J2EEpersistence-context-ref
An element
persistence-context-ref
as defined in J2EEpersistence-unit-ref
An element
persistence-unit-ref
as defined in J2EEpost-construct
An element
post-construct
as defined in J2EEpre-destroy
An element
pre-destroy
as defined in J2EEdata-source
An element
data-source
as defined in J2EEcontext-root
Root context of the web-app. It defaults to the filename of the deployememt without the .war suffix
virtual-host
Name of the
virtual-host
the application will accept request from.annotation
Element describing an
annotation
of the webapp.listener
Element describing a
listener
of the webapp.session-config
Element describing the
session-config
of the webapp.valve
Element describing a
valve
of the webapp.overlay
name of the overlay to add the webapp
security-domain
Name of the security domain to use for the webapp
security-role
Element describing a
security-role
of the webapp.jacc-star-role-allow
NOT YET SUPPORTED: See JBMETA-134
disable-cross-context
Prevent application to call another application context. Default:
true
Nested Components
annotation
annotation
describes how the annotation of the webapp
Attribute Description class-name
name of class of the annotation.
servlet-security
servlet-security
Element (like @ServletSecurity)run-as
servlet-security
Element (like @RunAs)multi-part
servlet-security
Element (like @MultipartConfig)
listener
listener
describes a listener of the webapp.
Attribute Description class-name
name of class of the listener.
list of
condition
Elements. See condition below.listener-type
Tell 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.
module
name of the module containing the listener class.
param
A parameter:
param-name
andparam-name
session-config
session-config
describes the session configuration of the web-app that is like the<session-config>
of theweb.xml
. It is here for compatibility
valve
valve
describes a valve of the webapp. Similar to thelistener
hasclass-name
,module
and<param/>
security-role
security-role
describes a securite role of the web-app that is like the<security-role;
of theweb.xml
. It is here for compatibility