You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joel Hughes <jo...@redknee.com> on 2000/03/30 15:58:23 UTC

A Working Config for Tomcat 3.1b1 and Cocoon 1.7

It was a struggle but Tomcat and Cocoon are finally cooperating with webapps
that are not under the tomcat directory tree.
I've included the important bits from my config files for the rest of you
who are having a similar struggle.
 
Version: Tomcat 3.1b1, Cocoon 1.7, Apache 1.3.11, OS NT 4 sp 6
So you can make sense of my files: 
- htdoc root is C:\Development\Projects\www\htdocs
- tomcat root is C:\Development\ApacheGroup\jakarta\jakarta-tomcat
- example site is 'eCare'
 
1. eCare webapp layout
.../htdocs/eCare/*.xml (site xml files such as eCareLogin.xml)
.../htdocs/eCare/xsl/
.../htdocs/eCare/xsp/
.../htdocs/eCare/WEB-INF/web.xml
.../htdocs/eCare/WEB-INF/classes/eCare.class (servlet)
Note: all references to the eCare servlet are of the form
"/eCare/servlet/eCare"
 
2. eCare webapp web.xml
<web-app>
    <servlet>
      <servlet-name>
        eCare
      </servlet-name>
      <servlet-class>
        eCare
      </servlet-class>
    </servlet>
    <init-param>
      <param-name>
        jdbc.Vendor
      </param-name>
      <param-value>
        oracle
      </param-value>
    </init-param>
    <init-param>
      <param-name>
        jdbc.Server
      </param-name>
      <param-value>
        s1
      </param-value>    
           ....
</web-app>
 
3. Apache/conf/httpd.conf
Added handler for cocoon:
    Action cocoon /servlet/org.apache.cocoon.Cocoon
    AddHandler cocoon .xml
 
Added include for tomcat.conf 
Note: I did not use tomcat-apache.conf as it was not being updated with
tomcat.conf on initialization of tomcat.
    include
"C:\Development\ApacheGroup\jakarta\jakarta-tomcat\conf\tomcat.conf"
 
Note: There were no virtual hosts in httpd.conf.
 
4. jakarta-tomcat/conf/
    4.a server.xml    
        <!-- eCare -->
        <Context path="/eCare"
docBase="C:\Development\Projects\www\htdocs\eCare" debug="0"
reloadable="true">
        </Context>
 
    4.b web.xml
        <!-- Cocoon -->
  <servlet>
    <servlet-name>cocoon</servlet-name>
    <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
    <init-param>
      <param-name>properties</param-name>
      <param-value>
        C:/Development/ApacheGroup/Cocoon-1.7/conf/cocoon.properties
      </param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>cocoon</servlet-name>
    <url-pattern>*.xml</url-pattern>
  </servlet-mapping>
 
    4.c tomcat.conf
        - commented "AddType test/.jsp .jsp"
        - commented "AddHandler jserv-servlet .jsp"
        - commented "ApJservMount /examples /root"
        - created "ApJservMount /servlet /ROOT"
        - created following eCare config section:
## eCare Configuration
Alias /eCare C:\Development\Projects\www\htdocs\eCare
<Directory "C:\Development\Projects\www\htdocs\eCare">
  Options Indexes FollowSymLinks
  Options -Indexes
  DirectoryIndex index.html
</Directory>
<Location /eCare/WEB-INF/ >
     AllowOverride None
     deny from all
</Location>
ApJservMount /eCare/servlet /eCare

 
Hope this helps.
Joel

RE: A Working Config for Tomcat 3.1b1 and Cocoon 1.7

Posted by Tsoloane Moahloli <ts...@zen.co.za>.
Thanks!!! 

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 3/31/00, 2:12:54 PM, Ed Knutson <ed...@webcombo.net> wrote regarding 
RE: A Working Config for Tomcat 3.1b1 and Cocoon 1.7:


> On Fri, 31 Mar 2000, Tsoloane Moahloli wrote:
> >
> > Hmmm, anyone got it working with vhosts yet???  This is the one thing
> > making me stay with jserv.

> I used the tomcat.conf file with:
> AddType text/xml
> AddHandler jserv-servlet .xml

> Make a separate Tomcat context for each vhost DocumentRoot in 
server.xml.
> In the WEB-INF/web.xml for each context, set up Cocoon like normal 
with a
> <servlet-mapping> block.

> That did the trick.

> -ed

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org




RE: A Working Config for Tomcat 3.1b1 and Cocoon 1.7

Posted by Ed Knutson <ed...@webcombo.net>.
On Fri, 31 Mar 2000, Tsoloane Moahloli wrote:
> 
> Hmmm, anyone got it working with vhosts yet???  This is the one thing 
> making me stay with jserv.

I used the tomcat.conf file with:
AddType text/xml
AddHandler jserv-servlet .xml

Make a separate Tomcat context for each vhost DocumentRoot in server.xml. 
In the WEB-INF/web.xml for each context, set up Cocoon like normal with a
<servlet-mapping> block.

That did the trick.

-ed

RE: A Working Config for Tomcat 3.1b1 and Cocoon 1.7

Posted by Tsoloane Moahloli <ts...@zen.co.za>.
Hmmm, anyone got it working with vhosts yet???  This is the one thing 
making me stay with jserv.

Thanks
Tsoloane

Original Message dated 3/30/00, 11:37:19 PM
Author: "Roger Vaughn" <rv...@seaconinc.com>
Re: RE: A Working Config for Tomcat 3.1b1 and Cocoon 1.7:


Beautiful.  Just what I was looking for.  Thanks.
-----Original Message-----
From: Joel Hughes [mailto:joel@redknee.com]
Sent: Thursday, March 30, 2000 8:58 AM
To: Tomcat-User (E-mail); Cocoon-Users (E-mail)
Subject: A Working Config for Tomcat 3.1b1 and Cocoon 1.7
It was a struggle but Tomcat and Cocoon are finally cooperating with 
webapps that are not under the tomcat directory tree.
I've included the important bits from my config files for the rest of 
you who are having a similar struggle.
 
Version: Tomcat 3.1b1, Cocoon 1.7, Apache 1.3.11, OS NT 4 sp 6
So you can make sense of my files: 
- htdoc root is C:\Development\Projects\www\htdocs
- tomcat root is C:\Development\ApacheGroup\jakarta\jakarta-tomcat
- example site is 'eCare'
 
1. eCare webapp layout
.../htdocs/eCare/*.xml (site xml files such as eCareLogin.xml)
.../htdocs/eCare/xsl/
.../htdocs/eCare/xsp/
.../htdocs/eCare/WEB-INF/web.xml
.../htdocs/eCare/WEB-INF/classes/eCare.class (servlet)
Note: all references to the eCare servlet are of the form 
"/eCare/servlet/eCare"
 
2. eCare webapp web.xml
<web-app>
    <servlet>
      <servlet-name>
        eCare
      </servlet-name>
      <servlet-class>
        eCare
      </servlet-class>
    </servlet>
    <init-param>
      <param-name>
        jdbc.Vendor
      </param-name>
      <param-value>
        oracle
      </param-value>
    </init-param>
    <init-param>
      <param-name>
        jdbc.Server
      </param-name>
      <param-value>
        s1
      </param-value>    
           ....
</web-app>
 
3. Apache/conf/httpd.conf
Added handler for cocoon:
    Action cocoon /servlet/org.apache.cocoon.Cocoon
    AddHandler cocoon .xml
 
Added include for tomcat.conf 
Note: I did not use tomcat-apache.conf as it was not being updated 
with tomcat.conf on initialization of tomcat.
    include 
"C:\Development\ApacheGroup\jakarta\jakarta-tomcat\conf\tomcat.conf"
 
Note: There were no virtual hosts in httpd.conf.
 
4. jakarta-tomcat/conf/
    4.a server.xml    
        <!-- eCare -->
        <Context path="/eCare" 
docBase="C:\Development\Projects\www\htdocs\eCare" debug="0" 
reloadable="true">
        </Context>
 
    4.b web.xml
        <!-- Cocoon -->
  <servlet>
    <servlet-name>cocoon</servlet-name>
    <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
    <init-param>
      <param-name>properties</param-name>
      <param-value>
        C:/Development/ApacheGroup/Cocoon-1.7/conf/cocoon.properties
      </param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>cocoon</servlet-name>
    <url-pattern>*.xml</url-pattern>
  </servlet-mapping>
 
    4.c tomcat.conf
        - commented "AddType test/.jsp .jsp"
        - commented "AddHandler jserv-servlet .jsp"
        - commented "ApJservMount /examples /root"
        - created "ApJservMount /servlet /ROOT"
        - created following eCare config section:
## eCare Configuration
Alias /eCare C:\Development\Projects\www\htdocs\eCare
<Directory "C:\Development\Projects\www\htdocs\eCare">
  Options Indexes FollowSymLinks
  Options -Indexes
  DirectoryIndex index.html
</Directory>
<Location /eCare/WEB-INF/ >
     AllowOverride None
     deny from all
</Location>
ApJservMount /eCare/servlet /eCare
 
Hope this helps.
Joel


RE: A Working Config for Tomcat 3.1b1 and Cocoon 1.7

Posted by Roger Vaughn <rv...@seaconinc.com>.
Beautiful.  Just what I was looking for.  Thanks.
  -----Original Message-----
  From: Joel Hughes [mailto:joel@redknee.com]
  Sent: Thursday, March 30, 2000 8:58 AM
  To: Tomcat-User (E-mail); Cocoon-Users (E-mail)
  Subject: A Working Config for Tomcat 3.1b1 and Cocoon 1.7


  It was a struggle but Tomcat and Cocoon are finally cooperating with
webapps that are not under the tomcat directory tree.
  I've included the important bits from my config files for the rest of you
who are having a similar struggle.

  Version: Tomcat 3.1b1, Cocoon 1.7, Apache 1.3.11, OS NT 4 sp 6
  So you can make sense of my files:
  - htdoc root is C:\Development\Projects\www\htdocs
  - tomcat root is C:\Development\ApacheGroup\jakarta\jakarta-tomcat
  - example site is 'eCare'

  1. eCare webapp layout
  .../htdocs/eCare/*.xml (site xml files such as eCareLogin.xml)
  .../htdocs/eCare/xsl/
  .../htdocs/eCare/xsp/
  .../htdocs/eCare/WEB-INF/web.xml
  .../htdocs/eCare/WEB-INF/classes/eCare.class (servlet)
  Note: all references to the eCare servlet are of the form
"/eCare/servlet/eCare"

  2. eCare webapp web.xml
  <web-app>
      <servlet>
        <servlet-name>
          eCare
        </servlet-name>
        <servlet-class>
          eCare
        </servlet-class>
      </servlet>
      <init-param>
        <param-name>
          jdbc.Vendor
        </param-name>
        <param-value>
          oracle
        </param-value>
      </init-param>
      <init-param>
        <param-name>
          jdbc.Server
        </param-name>
        <param-value>
          s1
        </param-value>
             ....
  </web-app>

  3. Apache/conf/httpd.conf
  Added handler for cocoon:
      Action cocoon /servlet/org.apache.cocoon.Cocoon
      AddHandler cocoon .xml

  Added include for tomcat.conf
  Note: I did not use tomcat-apache.conf as it was not being updated with
tomcat.conf on initialization of tomcat.
      include
"C:\Development\ApacheGroup\jakarta\jakarta-tomcat\conf\tomcat.conf"

  Note: There were no virtual hosts in httpd.conf.

  4. jakarta-tomcat/conf/
      4.a server.xml
          <!-- eCare -->
          <Context path="/eCare"
docBase="C:\Development\Projects\www\htdocs\eCare" debug="0"
reloadable="true">
          </Context>

      4.b web.xml
          <!-- Cocoon -->
    <servlet>
      <servlet-name>cocoon</servlet-name>
      <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
      <init-param>
        <param-name>properties</param-name>
        <param-value>
          C:/Development/ApacheGroup/Cocoon-1.7/conf/cocoon.properties
        </param-value>
      </init-param>
    </servlet>
    <servlet-mapping>
      <servlet-name>cocoon</servlet-name>
      <url-pattern>*.xml</url-pattern>
    </servlet-mapping>

      4.c tomcat.conf
          - commented "AddType test/.jsp .jsp"
          - commented "AddHandler jserv-servlet .jsp"
          - commented "ApJservMount /examples /root"
          - created "ApJservMount /servlet /ROOT"
          - created following eCare config section:
  ## eCare Configuration
  Alias /eCare C:\Development\Projects\www\htdocs\eCare
  <Directory "C:\Development\Projects\www\htdocs\eCare">
    Options Indexes FollowSymLinks
    Options -Indexes
    DirectoryIndex index.html
  </Directory>
  <Location /eCare/WEB-INF/ >
       AllowOverride None
       deny from all
  </Location>
  ApJservMount /eCare/servlet /eCare


  Hope this helps.
  Joel