geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Geronimo Wiki] Update of "Tomcat" by AnitaKulshreshtha
Date Mon, 29 Aug 2005 13:29:26 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Geronimo Wiki" for change notification.

The following page has been changed by AnitaKulshreshtha:
http://wiki.apache.org/geronimo/Tomcat

------------------------------------------------------------------------------
  
  
  = How to run Apache Tomcat =
+ == For the impatient ==
+  Assuming you have built the server using the instructions for "building the full server"
at wiki.apache.org/geronimo/Building. To build Geronimo with Tomcat as the web container :
- 
- By default, Geronimo is set up with Jetty as the web deployer (!JettyModuleBuilder). When
a webapp is deployed using !JettyModuleBuilder it will reference Jetty as a web container
(in other, more technical, words - the plan contains a reference to !JettyContainer). A module
builder chooses what container the webapp will be deployed to. To enable Apache Tomcat as
a web container, it's necessary to enable !TomcatModuleBuilder (which will assign Apache Tomcat
to the deployed webapps). Although at the end two web containers are run (Jetty listens to
8080 whereas Tomcat to 8090), but it's not yet simple to deploy some webapps using !TomcatModuleBuilder
and some using !JettyModuleBuilder.
- 
- In order to deploy webapps to Apache Tomcat, uncomment the sections marked similarly to:
- 
   {{{
+ cd modules/assembly
+ maven tomcat
- <!--
-    - Uncomment this to run Apache Tomcat as a web container
-    -
- ...
-    -->
  }}}
  
- and comment each gbean that follows the sections that are marked similarly to:
+ By default, Geronimo is set up with Jetty as the web deployer (!JettyModuleBuilder). When
a webapp is deployed using !JettyModuleBuilder it will reference Jetty as a web container
(in other, more technical, words - the plan contains a reference to !JettyContainer). A module
builder chooses what container the webapp will be deployed to. To enable Apache Tomcat as
a web container, it's necessary to enable !TomcatModuleBuilder (which will assign Apache Tomcat
to the deployed webapps). It requires the building the server again. It's not yet possible
to change the web container after the server is built.
  
+ Start up Geronimo as follows (see ["Running"]):
-  {{{
- <!--
-    - Comment this to run Apache Tomcat as a web container
-    -
-    -->
- }}}
- 
- in ''modules/assembly/src/plan/j2ee-deployer-plan.xml'' and ''modules/assembly/src/plan/j2ee-runtime-deployer-plan.xml''
- 
- Once it's done, rebuild the assembly module, and start up Geronimo as follows (see ["Running"]):
   {{{
  java -Djava.endorsed.dirs=lib/endorsed -jar bin/server.jar 
  }}}
  
  '''NOTE''': The java.endorsed.dirs variable must be set on the java command line, or Tomcat
will not start.
- 
- Now start the Tomcat configuration (see ["Deployment"]) by starting another shell (command
window) and issuing the following command:
-  {{{
- java -jar bin/deployer.jar --user system --password manager start org/apache/geronimo/Tomcat
- }}}
- 
- '''NOTE''': The next time you start Geronimo, it will start the configurations that were
previously started, so there is no need to issue the previous command again.
  
  '''NOTE''': The `CATALINA_HOME` environment variable is not used by Tomcat when running
inside Geronimo. The Catalina home directory is set to ''var/catalina/'' via the GBean attribute
`catalinaHome` in the ''j2ee-server-tomcat-plan.xml'' file. 
  
@@ -400, +378 @@

     A module builder is selected by uncommenting the Tomcat section in j2ee-runtime-deployer-plan.xml
and commenting out Jetty section. Thus either TomcatModuleBuilder or JettyModuleBuilder gbean
is created. When Tomcat is selected, it will use the common geronimo-web.xml file, process
any Tomcat-specific container-config params, and invoke the Tomcat container.
  
   * What are the steps to disable Jetty and only have Tomcat?  I would imagine the majority
of users would want to use one or the other, but not both? 
+     Now Tomcat can fully replace Jetty as a web container.   
-     Tomcat can fully replace Jetty as a web container. All references to Jetty must be commented
out.  Finally in the j2ee-deployer-plan.xml and j2ee-runtime-deployer-plan.xml, there is a
GBean named {{{EJBBuilder}}}.  Change the listener attribute to contain the following:
- {{{
- <attribute name="listener">geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=GBean,name=TomcatWebContainer</attribute>
- }}}
- Notice it used to contain a reference to the JettyWebContainer, and we changed it to the
TomcatWebContainer.  This should allow you to use Tomcat completely exclusively of Jetty.
  
  

Mime
View raw message