I'm having trouble trying to get Apache to recognize my deployment descriptor
(web.xml) on both win98 and Unix (Solaris v5.7).  I'm running Apache 1.3.20 and
Tomcat 3.20 on both.

For example the SUN Java servlet tutorial application bookstore.war doesn't work
the way I want. This application unwars into <TOMCAT_HOME>/webapps/bookstore
just fine. I can access the bookstore application just as I'd expect and want
under tomcat using the URL:

   http://hostname:8080/bookstore/enter
   
However, on the same machine the following URL doesn't work going through Apache
and gives a 404 error.

   http://hostname/bookstore/enter
   
When trying this URL on my Win98SE machine, the Apache error log shows:

   [Thu Jun 28 18:34:54 2001] [error] [client 127.0.0.1] File does not exist:
c:/program files/apache group/apache/htdocs/bookstore/Enter
   
I get essentially the same response on the Unix system, with the "Enter"
replaced with "enter" and looking something like:

   /opt/httpd/htdocs/bookstore/enter
   
The Deployment Descriptor (aka web.xml) portion for the application typically
looks like:

   <?xml version="1.0" encoding="ISO-8859-1"?>
   
   <!DOCTYPE web-app
       PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
       "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
   
   <web-app>
   
        <servlet>
                <servlet-name>enter</servlet-name>
                <servlet-class>BookStoreServlet</servlet-class>
        </servlet>
        o
        o
        o
        <servlet-mapping>
                <servlet-name>enter</servlet-name>
                <url-pattern>/enter</url-pattern>
        </servlet-mapping>
        o
        o
        o
   </web-app>

I've spent the last week looking through the mailing list archives and trying to
hack something that worked without luck.  (That thing on Solaris about moving or
linking the JDK tools.jar to the <TOMCAT_HOME>/lib directory was very
annoying.)   The only thing I've been able to come up with is to copy the
mod_jk.conf-auto file to my mod_jk.conf and include this file in httpd.conf. 
Hopefully, this is not the answer since I'd have to modify this file for each
context I add and consider the question "what's the purpose of mod_jk").  I've
seen many discussions on similar problems but nothing seems to work.  This seems
to be a common area of confusion and frustration with the Tomacat Apache
marriage.  I've given up on anything fancy, I'd settle on anything that will
re-direct anything to given directories to tomcat.  Does anyone have a
suggestion on how to get this simple "mapping" to work?

I've also noticed all the connections seem to be via Ajp12 rather than the more
efficient Ajp13 protocol.  I've modified the server.xml file to include the
Ajp13 Connector. How do I force all connections to Ajp13 and forget Ajp12? 
Granted, I need to leave the Ajp12 protocol enabled as a connector to allow
shutting down tomcat.

I'm rather panic'ed for an answer since I convinced our customer that Oracle
9iAS using Jserv was not what we wanted to use.

Help and TIA
-joe-

Reply via email to