Versions Compared

Key

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

...

The top-most element in the geronimo-web-2.0.1.xsd is <web-app> element. The top-level elements of the <web-app> element are described below:

<sys:environment>

The <sys:environment> elements use the Geronimo deployment namespace described at http://geronimo.apache.org/schemas-2.1/docs/geronimo-module-1.2.xsd.html. The <sys:environment> contains the following elements:

...

Code Block
xml
xml
borderStylesolid
title<sys:environment> example
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">

    <sys:environment>

        <sys:moduleId>
            <sys:groupId>default</sys:groupId>
            <sys:artifactId>geronimo-web-6</sys:artifactId>
            <sys:version>1.0</sys:version>
            <sys:type>car</sys:type>
        </sys:moduleId>

        <sys:dependencies>
            <sys:dependency>
                <sys:groupId>org.apache.geronimo.configs</sys:groupId>
                <sys:artifactId>tomcat6</sys:artifactId>
                <sys:version>2.2-SNAPSHOT</sys:version>
                <sys:type>car</sys:type>
            </sys:dependency>

            <sys:dependency>
                <sys:groupId>default</sys:groupId>
                <sys:artifactId>geronimo-web-5</sys:artifactId>
                <sys:version>1.0</sys:version>
                <sys:type>car</sys:type>
            </sys:dependency>

            <sys:dependency>
                <sys:groupId>default</sys:groupId>
                <sys:artifactId>geronimo-web-4</sys:artifactId>
                <sys:version>1.0</sys:version>
                <sys:type>car</sys:type>
            </sys:dependency>

        </sys:dependencies>

        <sys:hidden-classes/>
        <sys:non-overridable-classes/>
        <sys:inverse-classloading/>
        <sys:suppress-default-environment/>

    </sys:environment> 
   
</web-app>

<context-root>

The <context-root> uses the Geronimo default namespace for a geronimo-web.xml file that is described at http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1. 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> uses the Geronimo default namespace for a geronimo-web.xml file that is described at http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1. 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.

<naming:web-container>

The <naming:web-container> uses the Geronimo naming namespace 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:

Code Block
xml
xml
borderStylesolid
title<naming:web-container> example
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">

    <sys:environment>

        <sys:moduleId>
            <sys:groupId>default</sys:groupId>
            <sys:artifactId>geronimo-web-6</sys:artifactId>
            <sys:version>1.0</sys:version>
            <sys:type>car</sys:type>
        </sys:moduleId>

        <sys:dependencies>
            <sys:dependency>
                <sys:groupId>org.apache.geronimo.configs</sys:groupId>
                <sys:artifactId>tomcat6</sys:artifactId>
                <sys:version>2.2-SNAPSHOT</sys:version>
                <sys:type>car</sys:type>
            </sys:dependency>

            <sys:dependency>
                <sys:groupId>default</sys:groupId>
                <sys:artifactId>geronimo-web-5</sys:artifactId>
                <sys:version>1.0</sys:version>
                <sys:type>car</sys:type>
            </sys:dependency>

            <sys:dependency>
                <sys:groupId>default</sys:groupId>
                <sys:artifactId>geronimo-web-4</sys:artifactId>
                <sys:version>1.0</sys:version>
                <sys:type>car</sys:type>
            </sys:dependency>

        </sys:dependencies>

        <sys:hidden-classes/>
        <sys:non-overridable-classes/>
        <sys:inverse-classloading/>
        <sys:suppress-default-environment/>

    </sys:environment> 

    <context-root>contextroot</web:context-root>

    <work-dir>workdir</web:work-dir>   

    <naming:web-container>
        <naming:pattern>
            <naming:groupId>gbeanlocator-pattern-groupid</naming:groupId>
            <naming:artifactId>gbeanlocator-pattern-artifactid</naming:artifactId>
            <naming:version>gbeanlocator-pattern-version</naming:version>
            <naming:module>gbeanlocator-pattern-module</naming:module>
            <naming:name>gbeanlocator-pattern-name</naming:name>
        </naming:pattern>
        <naming:gbean-link>gbeanlocator-gbeanlink</naming:gbean-link>
    </naming:web-container>

</web-app>

<container-config>

The <container-config> uses the Geronimo default namespace for a geronimo-web.xml file that is described at http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1. 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:

Code Block
xml
xml
borderStylesolid
title<container-config> example
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">

    <sys:environment>

        <sys:moduleId>
            <sys:groupId>default</sys:groupId>
            <sys:artifactId>geronimo-web-6</sys:artifactId>
            <sys:version>1.0</sys:version>
            <sys:type>car</sys:type>
        </sys:moduleId>

        <sys:dependencies>
            <sys:dependency>
                <sys:groupId>org.apache.geronimo.configs</sys:groupId>
                <sys:artifactId>tomcat6</sys:artifactId>
                <sys:version>2.2-SNAPSHOT</sys:version>
                <sys:type>car</sys:type>
            </sys:dependency>

            <sys:dependency>
                <sys:groupId>default</sys:groupId>
                <sys:artifactId>geronimo-web-5</sys:artifactId>
                <sys:version>1.0</sys:version>
                <sys:type>car</sys:type>
            </sys:dependency>

            <sys:dependency>
                <sys:groupId>default</sys:groupId>
                <sys:artifactId>geronimo-web-4</sys:artifactId>
                <sys:version>1.0</sys:version>
                <sys:type>car</sys:type>
            </sys:dependency>

        </sys:dependencies>

        <sys:hidden-classes/>
        <sys:non-overridable-classes/>
        <sys:inverse-classloading/>
        <sys:suppress-default-environment/>

    </sys:environment> 

    <context-root>contextroot</web:context-root>

    <work-dir>workdir</web:work-dir>   

    <naming:web-container>
        <naming:pattern>
            <naming:groupId>gbeanlocator-pattern-groupid</naming:groupId>
            <naming:artifactId>gbeanlocator-pattern-artifactid</naming:artifactId>
            <naming:version>gbeanlocator-pattern-version</naming:version>
            <naming:module>gbeanlocator-pattern-module</naming:module>
            <naming:name>gbeanlocator-pattern-name</naming:name>
        </naming:pattern>
        <naming:gbean-link>gbeanlocator-gbeanlink</naming:gbean-link>
    </naming:web-container>

    <container-config>
        <tomcat xmlns="http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0">
            <host>testhost.com</host>
            <valve-chain>FirstValve</valve-chain>
            <tomcat-realm>TomcatRealm</tomcat-realm>
        </tomcat>
    </container-config>


</web-app>

<naming:abstract-naming-entry>

<ejb-ref>

The <context-root> uses the default namespaced described at
'The element ejb-ref 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.'

<ejb-local-ref>

The <context-root> uses the default namespaced described at
'The element ejb-local-ref 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.'

<service-ref>

The <context-root> uses the default namespaced described at

'The element service-ref 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.'

<resource-ref>

The <context-root> uses the default namespaced described at
'The element resource-ref is used to map resource references to resources\'s like JDBC resources, JMS resources, etc. configured outside the current application.'

<resource-env-ref>

The <context-root> uses the default namespaced described at
'The element resource-env-ref is used to map resource references to administrative objects deployed as a part of connectors.'

<naming:message-destination>

The <context-root> uses the default namespaced described at

References a message-destination (such as JMS queues), which is used within the deployed WAR file.

<security-realm-name>

The <context-root> uses the default namespaced described at

Specifies the name of the security realm that will be used for user authentication.

<app:security>

The <context-root> uses the default namespaced described at

Configures the security role mappings that will be used when deploying the module. Maps roles specified in the WAR file to roles or principals in the security realm

<sys:service>

The <context-root> uses the default namespaced described at

'Reference to abstract service element defined in imported \"geronimo-module-1.2.xsd\"'

<ee:persistence>

The <context-root> uses the default namespaced described at

...