You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim McAuley <mc...@tcd.ie> on 2001/09/26 16:07:33 UTC

Tomcat 3.2.3 to 4.0 and mod_jk to webapp migration

Hi there,

I need a small bit of help.

I am moving from using Tomcat 3.2.3 and mod_jk to now using Tomcat 4.0 with
webapp.

Under the old configuration, we had a seperate directory where we servered
our jsp pages from, say:
/var/test

To enable us to use this we added the following configuration details to:
mod_jk.conf.current (included by httpd.conf, and initially created the first
time Tomcat ran)

    # Setup aliases for the ichara code
    Alias /test "/var/test"
    <Directory "/var/test">
        Options Indexes FollowSymLinks
    </Directory>

    JkMount /test/servlet/* ajp12
    JkMount /test/*.jsp ajp12

and to server.xml:

        <!--
                Added a context for the test jsp code
        -->
        <Context path="/test"
                 docBase="/var/test"
                 crossContext="false"
                 debug="0"
                 reloadable="true" >
        </Context>

Both of which were duplicating what was done to enable /examples to be used.
This seemed to work okay. However please tell me if this was not the correct
way to achieve what I wanted, and was only in fact hacking!

Now that we have switched to Tomcat 4.0 we need to do the same. So far the
context has been added once again to server.xml, and we can run jsp pages
through tomcat alone, i.e.
http://testserver:8080/test/test1.jsp

However, I am having difficulty with the webapp adapter for Apache. I did
not find a configuration file to include in apache, and have created my own.
Currently it looks like this:

    # Load the webapp module
    LoadModule      webapp_module   modules/mod_webapp.so

    # Add the module
    Addmodule       mod_webapp.c

    # Add the web application connections and context
    #         WebAppConnection warpConnection2 warp localhost:8008
    #         WebAppDeploy ichara warpConnection2 /ichara/
    WebAppConnection warpConnection warp localhost:8008
    WebAppDeploy examples warpConnection /examples/
    #WebAppDeploy test warpConnection /test/

If I leave the last line commented out, I can run "examples" through apache.
So therefore webapp seems to be running okay. If I uncomment the line, then
the server freezes while looking for examples or test.

I do seem to be missing something. Can anyone shed some light on this?

Many thanks,

Tim