You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by eric scroger <es...@carl.org> on 2002/10/03 02:58:07 UTC

Tomcat mod_jk context uri mapping problem.

Greetings,

I'm having a strange problem getting Tomcat to serve up servlets
with Apache using the mod_jk connectors.  I am using Tomcat 4.0.5
with Apache. 1.3.20 on Solaris 7.  I compiled the mod_jk.so library myself.
We are using Apache to help serve up the images while Tomcat
can deal with the servlets.

When I try to load up a servlet URL of the form:

    http://ourhost/someapp/servlet/appHome

I get a file not found in the browser.  Oddly enough the Tomcat example
Jsps and Servlets work find being served thru apache (minus port :8080).
If I check the apache error_log, I see the strange error that it thought
it was looking for /u1/apache/htdocs/someapp.css/servlet/appHome.
It appears the mod_jk interface is somehow causing apache to replace
the webapps dir, someapp, with a directory named after teh stylesheet,
someapp.css.  It's true the servlet appHome does use the stylesheet,
someapp.css.  

The relevant JkMount directives in httpd.conf are as follows:

    JkMount    /someapp    ajp13
    JkMount    /someapp/* ajp13

If I check the mod_jk.log file with debug turned on, I do see that
the jk_uri_worker_map_t does indeed map the mount expressions as:

    exact rule /someapp=ajp13 was added
    match rule /someapp/*=ajp13 was added

I've tried other ways to get this to work.  I've put a copy of the 
stylesheet
under tomcat as well and added the JkMount /someapp.css but that doesn't 
help.

Also, if I try to access our webapp thru Tomcat on port 8080 (below) it 
works
   
    http://ourhost:8080/someapp/servlet/appHome

If I change the name of our webapp to some other name, say myapp, then
again I can load the webapp as

    http://ourhost/myapp/servlet/appHome

However, we'd rather use the chosen name someapp (not real name for this 
discussion).
The weirdest thing is another coworker who did get this all to work 
apparently
using a very similar configuration.  He's using roughly the same Tomcat 
4.0.4.
I've tried. 4.0.3, 4.0.5, 4.1.12 and all have the same weird name conflict.

Anyone have a clue what is going on?  Thanks in advance.

Regards,

Eric


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>