You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Hans-Erik Skyttberg <Ha...@boxer.se> on 2001/09/25 14:47:59 UTC

WebAppDeploy syntax ?

Hi!


Context path="/webmail" docBase="/var/www/html/webmail" debug="0"
reloadable="true"/>

If I have this context in server.xml, How do I write the following ?
    WebAppDeploy webmail conn /webmail
Ths above won't work, so how should I write it ?
Like this:
    WebAppDeploy /var/www/html/webmail conn /webmail

Any help appreciated....

Hans - Erik Skyttberg
Boxer TV Access AB
Tegluddsv. 64
115 28 Stockholm
+46 (0)8 587 899 64
+46 (0)733 35 70 64




Re: WebAppDeploy syntax ?

Posted by Janek Bogucki <ja...@yahoo.co.uk>.
Hi Hans-Erik,

Are you sure you actually need to set up a context in
server.xml if you are using mod_webapp.so?

I think Pier say that the entire Tomcat-Standalone
Service can be removed from server.xml and mod_webapp
will set of the context automatically thus avoiding
conf data duplication.

I've just tried this and it appears to be working with
numguess.jsp. I went to the URL
http://127.0.0.1/examples/jsp/index.html okay and
interacted with numguess.jsp okay.

My httpd.conf file has this

--- httpd.conf ---

   WebAppConnection warpConnection warp localhost:8008
   WebAppDeploy examples warpConnection /examples

and this is my _entire_ server.xml file. There are no
Context elements in it. There is just one Service.

--- server.xml ---


<!-- Example Server Configuration File -->
<!-- Note that component elements are nested
corresponding to their
     parent-child relationships with each other -->

<!-- A "Server" is a singleton element that represents
the entire JVM,
     which may contain one or more "Service"
instances.  The Server
     listens for a shutdown command on the indicated
port.

     Note:  A "Server" is not itself a "Container", so
you may not
     define subcomponents such as "Valves" or
"Loggers" at this level.
 -->

<Server port="8005" shutdown="SHUTDOWN" debug="0">


  <!-- A "Service" is a collection of one or more
"Connectors" that share
       a single "Container" (and therefore the web
applications visible
       within that Container).  Normally, that
Container is an "Engine",
       but this is not required.

       Note:  A "Service" is not itself a "Container",
so you may not
       define subcomponents such as "Valves" or
"Loggers" at this level.
   -->

  <!-- The MOD_WEBAPP connector is used to connect
Apache 1.3 with Tomcat 4.0
       as its servlet container. Please read the
README.txt file coming with
       the WebApp Module distribution on how to build
it.
       (Or check out the
"jakarta-tomcat-connectors/webapp" CVS repository)

       To configure the Apache side, you must ensure
that you have the
       "ServerName" and "Port" directives defined in
"httpd.conf".  Then,
       lines like these to the bottom of your
"httpd.conf" file:

         LoadModule webapp_module
libexec/mod_webapp.so
         WebAppConnection warpConnection warp
localhost:8008
         WebAppDeploy examples warpConnection
/examples/

       The next time you restart Apache (after
restarting Tomcat, if needed)
       the connection will be established, and all
applications you make
       visible via "WebAppDeploy" directives can be
accessed through Apache.
  -->

  <!-- Define an Apache-Connector Service -->
  <Service name="Tomcat-Apache">

    <!-- Original element -->
    <!--Connector
className="org.apache.catalina.connector.warp.WarpConnector"
     port="8008" minProcessors="5" maxProcessors="75"
     enableLookups="true"
     acceptCount="10" debug="0"/-->

     <Connector
className="org.apache.catalina.connector.warp.WarpConnector"
     port="8008" minProcessors="5" maxProcessors="75"
     enableLookups="true"
     acceptCount="10" debug="1"/>

    <!-- Original element -->
    <!-- Replace "localhost" with what your Apache
"ServerName" is set to -->
    <!--Engine
className="org.apache.catalina.connector.warp.WarpEngine"
     name="Apache" debug="0" appBase="webapps"-->

    <Engine
className="org.apache.catalina.connector.warp.WarpEngine"
     name="Apache" debug="0" appBase="webapps"
     defaultHost="yyy.xxx.co.uk">

      <!-- Global logger unless overridden at lower
levels -->
      <Logger
className="org.apache.catalina.logger.FileLogger"
              prefix="apache_log." suffix=".txt"
              timestamp="true"/>

      <!-- Because this Realm is here, an instance
will be shared globally -->
      <Realm
className="org.apache.catalina.realm.MemoryRealm" />

    </Engine>

  </Service>

</Server>

 --- Hans-Erik Skyttberg
<Ha...@boxer.se> wrote: > Hi!
> 
> 
> Context path="/webmail"
> docBase="/var/www/html/webmail" debug="0"
> reloadable="true"/>
> 
> If I have this context in server.xml, How do I write
> the following ?
>     WebAppDeploy webmail conn /webmail
> Ths above won't work, so how should I write it ?
> Like this:
>     WebAppDeploy /var/www/html/webmail conn /webmail
> 
> Any help appreciated....
> 
> Hans - Erik Skyttberg
> Boxer TV Access AB
> Tegluddsv. 64
> 115 28 Stockholm
> +46 (0)8 587 899 64
> +46 (0)733 35 70 64
> 
> 
>  

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie