Wiki Markup |
---|
{scrollbar} |
Excerpt | ||
---|---|---|
| ||
A Web application requires |
In the
geronimo-web.xml
file, application deployer maps the security roles, ejb names, database resources, JMS resources, etc. declared in web.xml
to corresponding entities deployed in the server. In addition to that, if there are any web container specific configurations, such as Tomcat or Jetty specific, depending on the application needs, all these settings are configured as well here. If the web application depends on any third party libraries or other services running in the server, all these dependencies are declared in the plan. Some web applications require class loading requirements different from the default class loading behavior. The geronimo-web.xml
allows application deployer to configure this as well. There are many more configurations that could be done through geronimo-web.xml
depending on the needs of web application. The following sections briefly explain how geronimo-web.xml
can be used to configure the web container and web applications.The geronimo-web.xml
uses XML elements from http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1 namespace and one or more namespaces mentioned in Common elements and Configuration in Configuring resources in the application scope section earlier in the document.
Table of Contents |
---|
Sample plan for a Web application
For example, the following web.xml
and geronimo-web.xml
are the deployment descriptor and Geronimo deployment plan respectively, of a web application that connects to a datasource deployed on DB2 and retrieves data from a table.
...
Note |
---|
The default namespace of the above XML document is With Servlet 2.5 specification, many of the declarations done through |
...
Note |
---|
The default namespace of the above XML document is |
...
<sys:environment> .. </sys:environment>
: These elements provide the moduleid configuration and the dependencies. The moduleId elements provide the configuration name for the web module. So, when the web module is deployed, it is given the configuration name samples/samplesEmployeeDemo/2.5/jarwar
. The dependencies elements provide the configurations and third party libraries on which the web module is dependent on. These configurations and libraries will be available to the web module via a classloader hierarchy. In this case, the web module is dependent on samples/EmployeeDatasource/2.5/rar
which is the configuration of the deployed Datasource that connects to a back end DB2 database. The Datasource deploys a database connection pool (javax.sql.Datasource)
with name jdbc/EmployeeDatasource
.
...
All the XML schema files are located at <geronimo_home>/schema
directory. Please go through the .xsd
files to have a feel of XML tags that can be used in geronimo-web.xml
for configuring web applications.
Container specific configuration in a web application
Include Page | ||||
---|---|---|---|---|
|