This chapter is for the Web component provider; that is, the person in charge of developing the Web components on the server side.
The Web component programmer is responsible for providing the deployment descriptor associated with the developed web components. The Web component provider's responsibilities and the application assembler's responsibilities are to provide an XML deployment descriptor that conforms to the deployment descriptor's XML schema as defined in the Java Servlet Specification Version 2.4. (Refer to $JONAS_ROOT/xml/web-app_2_4.xsd or http://jonas.objectweb.org/current/xml/web-app_2_4.xsd).
To customize the Web components, information not defined in the standard XML deployment descriptor may be needed. For example, the information may include the mapping of the name of referenced resources to its JNDI name. This information can be specified during the deployment phase, within another XML deployment descriptor that is specific to JOnAS. The JOnAS-specific deployment descriptor's XML schema is located in $JONAS_ROOT/xml/jonas-web-app_X_Y.xsd. The file name of the JOnAS-specific XML deployment descriptor must be the file name of the standard XML deployment descriptor prefixed by "jonas-".
The parser gets the specified schema via the classpath (schemas are packaged in the $JONAS_ROOT/lib/common/ow_jonas.jar file).
The standard deployment descriptor (web.xml) should contain structural information that includes the following:
The servlet's description (including servlet's name, servlet's class or jsp-file, servlet's initialization parameters)
Environment entries
EJB references
EJB local references
Resource references
Resource env references.
The JOnAS-specific deployment descriptor (jonas-web.xml) may contain information that includes:
The JNDI name of the external resources referenced by a Web component
The JNDI name of the external resources environment referenced by a Web component
The JNDI name of the referenced beans by a Web component
The name of the virtual host on which to deploy the servlets
The name of the context root on which to deploy the servlets
The compliance of the web application classloader to the Java 2 delegation model or not.
<host> element: If the configuration file of the web container contains virtual hosts, the host on which the WAR file is deployed can be set.
<context-root> element: You should specify the name of the context on which the application will be deployed. If it is not specified, the context-root used can be one of the following:
If the WAR is packaged into an EAR file, the context-root used is the context specified in the application.xml file.
If the WAR is standalone, the context-root is the name of the WAR file (that is, the context-root is /jadmin for jadmin.war).
If the context-root is / or empty, the web application is deployed as ROOT context (that is, http://localhost:9000/).
<java2-delegation-model> element: Set the compliance to the Java 2 delegation model.
If true: the web application context uses a classloader, using the Java 2 delegation model (ask parent classloader first).
If false: the class loader searches inside the web application first, before asking parent class loaders.