tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rickard <>
Subject Apache-Tomcat Servlet Mapping Issues
Date Wed, 22 Jun 2005 23:29:10 GMT
System: Solaris SunOS 5.9
Apache: 2.0.52
Tomcat: 4.1.31
Mod JK: 1.2.6
The problem: Apache/mod_jk cannot resolve servlet URL mappings

When Tomcat is running stand-alone, it can resolve servlet mappings without 
any problems; so that a page with this form definition:
<FORM name="login" method="POST" action="loginhandler">
correctly invokes the servlet (which suggests 
there's nothing syntactically wrong with the <servlet> and 
<servlet-mapping> entries in web.xml);

When Tomcat stand-alone is turned off and Apache is turned on, that same 
page always throws a 404 error for "site/loginhandler"; these are the error 
messages in mod_jk.log:

[Wed Jun 22 09:04:08 2005]  [mod_jk.c (2313)]: mod_jk::jk_translate, check 
alias_dir: /usr/apache/tomcat/webapps
[Wed Jun 22 09:04:08 2005]  [mod_jk.c (2337)]: mod_jk::jk_translate, 
AutoAlias child_dir: loginhandler
[Wed Jun 22 09:04:08 2005]  [mod_jk.c (2363)]: mod_jk::jk_translate, 
AutoAlias OK for file: /usr/apache/tomcat/webapps/aiwosc/loginhandler
[Wed Jun 22 09:04:08 2005]  [jk_uri_worker_map.c (445)]: Into 
[Wed Jun 22 09:04:08 2005]  [jk_uri_worker_map.c (459)]: Attempting to map 
URI '/aiwosc/loginhandler'
[Wed Jun 22 09:04:08 2005]  [jk_uri_worker_map.c (577)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match

What terribly simple configuration error have I made here?

These are the web.xml entries for this servlet:

This is the file:

This is the app section from mod_jk.conf:
     #################### ####################

     # Static files
     Alias /aiwosc "/var/apache/tomcat/webapps/aiwosc"

     <Directory "/var/apache/tomcat/webapps/aiwosc">
         Options Indexes FollowSymLinks
         DirectoryIndex index.html

     # Deny direct access to WEB-INF and META-INF
     <Location "/aiwosc/WEB-INF/*">
         AllowOverride None
         deny from all

     <Location "/aiwosc/META-INF/*">
         AllowOverride None
         deny from all

     JkMount /aiwosc/addtitleservlet  ajp13
     JkMount /aiwosc/submittitleservlet  ajp13
     JkMount /aiwosc/transfertitleservlet  ajp13
     JkMount /aiwosc/saveoscservlet  ajp13
     JkMount /aiwosc/reordercastservlet  ajp13
     JkMount /aiwosc/loginhandler  ajp13
     JkMount /aiwosc/editcategoryservlet  ajp13
     JkMount /aiwosc/edittitleservlet  ajp13
     JkMount /aiwosc/addaddendumservlet  ajp13
     JkMount /aiwosc/*.jsp  ajp13
     JkMount /aiwosc/addcategoryservlet  ajp13

This is the <Context> entry for the app in server.xml:
         <!-- Oscars OSC Context -->
         <Context path="/aiwosc" docBase="aiwosc" debug="5"
                  reloadable="true" crossContext="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="aiwosc_log." suffix=".txt"

          <Resource name="jdbc/oscars" auth="Container"

           <ResourceParams name="jdbc/oscars">

And these are the mod_jk load/configuration entries from httpd.conf:
<IfModule !mod_jk.c>
         LoadModule jk_module modules/

Include /usr/apache/tomcat/conf/auto/mod_jk.conf
JkWorkersFile /usr/apache/tomcat/conf/
JkLogFile /usr/apache/logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

JkAutoAlias /usr/apache/tomcat/webapps
JkMount /*.jsp ajp13
JkMount /*/servlet/ ajp13


David Rickard
Software Engineer

Your Single Source Solution!
Los Angeles CA * York, PA * Boston,MA * New Delhi, India
Visit us on the World Wide Web 
5650 Jillson St., Los Angeles, CA 90040
(323) 888-8889 x331
(323) 888-1849 (Fax)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message