Versions Compared

Key

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

...

The list of web application files in the application is depicted by the following diagram.

No Format
borderColor#FFFFFF
bgColor#FFFFFF
borderStylesolid
|- jsp
    |+- common_error.jsp
    |+- popup.jsp
    |+- table_content.jsp
    |+- table_list.jsp
|- WEB-INF
    |+- geronimo-web.xml
    |+- web.xml
|- index.jsp

geronimo-web.xml defines the list of dependencies that have to be loaded into the web application class loader. In this case, there are no dependencies. Information about the project (e.g. module's unique identification, any dependencies) is described inside the <environment> tag. It is a good idea to give this module some sort of unique identification, so that it can later be referenced by some other deployable application. This module is in the group org.apache.geronimo.samples.dbtester. The path specified in the <context-root> tag will be the first segment of the URL used to access this web application. So to access this web application the url will be http://<hostname>:<port>/dbtester.

Code Block
xml
xml
borderStylesolid
titlegeronimo-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
        
    <environment>
        <moduleId>
            <groupId>${pom.groupId}<<groupId>org.apache.geronimo.samples</groupId>
            <artifactId>${pom.artifactId}<<artifactId>dbtester-war</artifactId>
            <version>${version}<<version>2.1-SNAPSHOT</version>
            <type>war</type>
        </moduleId>
    </environment>
                
    <context-root>/dbtester</context-root>

</web-app>

The structure of the final WAR should look like the following:

No Format
borderColor#FFFFFF
bgColor#FFFFFF
borderStylesolid
|- WEB-INF
  |+- classes
    |+- org
      |+- apache
        |+- geronimo
          |+- samples
            |+- dbtester
  |- web.xml
  |- geronimo-web.xml

...