Versions Compared

Key

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

...

Wiki Markup
Changing the Web container \[Jetty or Tomcat]

Selecting the Web container is very simple and it is limited to just renaming one file, the config.xml. Located in the <geronimo_home>/var/config directory there are several xml files. We will just focus on three of them:

  • config.xml
  • config.jetty.xml
  • config.tomcat.xml

When you download and build Apache Geronimo from source code (from the trunk) you would get a directory structure similar to this one:

  • applications
  • assemblies
  • configs
  • docs_nopublish
  • etc
  • modules
  • openejb
  • plugins
  • sandbox
  • xdocs
    No Format

If you look under the assemblies directory you will find the following subdirectories:

  • j2ee-installer
  • j2ee-jetty-server
  • j2ee-tomcat-server

We will focus on the last two directories that, as you may expect, contain self-contained images of Apache Geronimo configured to use either of these two Web containers.

Depending on whether you want to use Jetty or Tomcat you will change to the respective directory (j2ee-jetty-server or j2ee-tomcat-server), the internal subdirectory structure will be the same. Once in the Web container specific directory, change directory once again to target/geronimo-1.0-SNAPSHOT. This directory is your self-contained, totally complete, Apache Geronimo server. You may copy this directory to a different location. This directory is being referenced as <geronimo_home> throughout these series of articles.

So, selecting the Web container is no longer a matter of changing configuration files but rather choosing a directory structure for the different assenblies. Within this structure you will find a /bin directory, the next section explains the commands located in this directory and how to start and stop the serverconfig.xml is the file actually being read at the server startup time, the other two are configuration templates for those particular Web containers. Renaming config.jetty.xml or config.tomcat.xml to config.xml will set the Web container to Jetty or Tomcat next time you start Apache Geronimo.

Back to Top

Starting and stopping the server

...