After a bit of hacking around I finally got Tomcat to play nice with Apache2 on SuSE 9.2; now I can't seem to get Apache to read the default home directory files. When I run localhost/index.jsp, it brings up the file located in $TOMCAT_HOME/webapps/ROOT rather than /srv/www/htdocs. I thought maybe I had configured Tomcat incorrectly somehow and it was running on port 80; when I stopped Apache I was immediately unable to bring up index.jsp. The reverse occured when I restarted Apache.
Setup: SuSE 9.2 Sun JDK 1.5.0_02 Tomcat 5.5.7 mod_jk 1.2.10 Apache 2.0.50 [ April 06, 2005: Message edited by: Joe Tseng ]
I am no expert by any means on the Apache/Tomcat marriage. But I will try to explain it the best way I can.
Of course you know that the purpose of the mod_jk connector is to route JSP/Servlet requests thru Apache to Tomcat. Which pretty much makes Apache invisible to the user as far as JSP/Servlet requests are concerned.
The "rules" of deploying applications on TOMCAT still apply. All WAR files are to be deployed in the $CATALINA_HOME/webapps directory. Of course I believe it is possible to modify the server.xml to point to another default directory but that could cause you more headaches.
The rules of deploying applications for Apache still apply. If you place an non JSP page i.e. index.html in Apache's DocumentRoot directory, Apache will service the request. If you do place a JSP page in an Apache DocumentRoot directory, apache will try to service the request. Which I believe it will either display the JSP verbatium or some error message.
For example I have a similar setup as yours RH9 Apache Tomcat mod_jk2 etc.
Another example, I have just one website www.mywebsite.com. Where mywebsite.com is the name of the DocumentRoot directory. And in that directory ,I have one file (index.html) which contains one line, something similar to:
Which will route the user to the JSP index page. The url pattern "/mycontext/*" is configured in the httpd.conf or the workers2.properties.