Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
titlegeronimo-web.xml Example
borderStylesolid
<web:web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" 
             xmlns:depsys="http://geronimo.apache.org/xml/ns/deployment-1.2" 
             xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" 
             xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" 
             xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" 
             xmlns:pers="http://java.sun.com/xml/ns/persistence">
             ...
</web:web-app>

<sys:environment>

The <sys:environment> elements use XML element uses the Geronimo system and deployment namespace, which is used to specify the common elements for common libraries and module-scoped services, and is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-module-1.2.xsd.html. The <sys:environment> element contains the following elements:

...

<context-root>

The <context-root> XML element uses the Geronimo default namespace for a geronimo-web.xml file that is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-web-2.0.1.xsd.html. This element can be used to provide the web context path of the deployed web application, which appears in the URL used to address the application on a Geronimo server.

<work-dir>

The <work-dir> XML element uses the Geronimo default namespace for a geronimo-web.xml file that is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-web-2.0.1.xsd.html. This element can be used to provide the work directory that will be used by this web application. For Jetty this will be relative to jetty home which is var/jetty by default, and for Tomcat this will be relative to catalina.home.

...

The <naming:web-container> XML element uses the Geronimo naming namespace, used to identify the common elements for resolving EJB references, resource references, and Web services references, and is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-naming-1.2.xsd.html. It is used to specify a reference to a web-container
specific GBean either via a pattern or via a link to a GBean. An example geronimo-web.xml file is shown below using the <naming:web-container> elements:

...

<container-config>

The <container-config> XML element uses the Geronimo default namespace for a geronimo-web.xml file that is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-web-2.0.1.xsd.html. This element is used for the configuration of elements specific to the underlying Geronimo web container (i.e., Jetty or Tomcat). An example geronimo-web.xml file is shown below using the <container-config> elements for the Tomcat web container:

...

The <naming:abstract-naming-entry> XML element uses the Geronimo naming namespace described at http://geronimo.apache., used to identify the common elements for resolving EJB references, resource references, and Web services references, and is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-naming-1.2.xsd.html. It is an abstract element used as a generic element for multiple reference types.

<naming:ejb-ref>

The <naming:ejb-ref> XML element uses the Geronimo naming namespace, used to identify the common elements for resolving EJB references, resource references, and Web services references, and is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-naming-1.2.xsd.html. It is used to map EJB references to EJB\'s in other applications using remote home and remote interface. The application which contains the EJB being referenced should either be in same EAR or should be included in dependency list of this application. Also note as the EJB's referenced are in a different JVM all the Client interfaces should also be included in current application.

...

The <naming:ejb-local-ref> XML element uses the Geronimo naming namespace, used to identify the common elements for resolving EJB references, resource references, and Web services references, and is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-naming-1.2.xsd.html. It is used to map EJB references to EJB\'s in other applications using local home and local interface. The application which contains the EJB being referenced should either be in same EAR or should be included in dependency list of this application. Also note as the EJB's referenced are in a different JVM all the Client interfaces should also be included in current application.

<naming:service-ref>

The <naming:service-ref> XML element uses the Geronimo naming namespace naming namespace, used to identify the common elements for resolving EJB references, resource references, and Web services references, and is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-naming-1.2.xsd.html. It is used to map service references to service's in other applications. The application which contains the EJB being referenced should either be in same EAR or should be included in dependency list of this application.

<naming:resource-ref>

The <naming:resource-ref> XML element uses the Geronimo naming namespace, used to identify the common elements for resolving EJB references, resource references, and Web services references, and is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-naming-1.2.xsd.html. It is used to map resource references to resources's like JDBC resources, JMS resources, etc. configured outside the current application.

...

The <naming:resource-env-ref> XML element uses the Geronimo naming namespace, used to identify the common elements for resolving EJB references, resource references, and Web services references, and is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-naming-1.2.xsd.html. It is used to map resource references to administrative objects deployed as a part of connectors.

...

The <naming:message-destination> XML element uses the Geronimo naming namespace, used to identify the common elements for resolving EJB references, resource references, and Web services references, and is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-naming-1.2.xsd.html. It is used to configure a JMS queue
or topic which acts like a destination for the messages delivered.

<security-realm-name>

The <security-realm-name> XML element uses the Geronimo default namespace for a geronimo-web.xml file that is described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-web-2.0.1.xsd.html. It is used to specify the name of the security realm that will be used for user authentication.

<app:security>

The <app:security> XML element uses the Geronimo applicaiton namespace described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-application-2.0.xsd.html. It is used to maps roles specified in the WAR file to roles or principals in the security realm that will be used when deploying the module.

<sys:service>

The <sys:service> XML element uses the Geronimo deployment namespace described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-module-1.2.xsd.html. It is an empty generic element to be extended by GBean and other module types.

<ee:persistence>

The <ee:persistence> XML element uses the persistence namespace described at http://java.sun.com/xml/ns/persistence/. Apache Geronimo uses OpenJPA for providing Java Persistence API to Java EE applications deployed in the server.

...