I'm having an issue where it appears the servlet-mapping is not working.
I have a web.xml file which works great locally.
However, locally, I just use Tomcat, and the server also uses Apache.
I added the following tag to the /usr/local/jakarta/jakarta-tomcat-5.0.27/conf/auto/mod_jk.conf file in apache:
JkMount /servlet-mapping/* ajp13
but, unfortunately, this didn't help.
What's happening is that there doesn't seem to be any connection between the servlet-mappings and doing, say, a FORM ACTION = "/someURL/SomeServlet".
I just keep getting that the "requested URL is not found on this server".
I would appreciate any ideas or things to try.
Joined: May 20, 2002
Two quick checks you need to make. First, on the server, hit your url using port 8080 (the tomcat default) and see if you can access your page.
Also, apache configured to work with mod_jk? The connection will be listed in apache's httpd.conf file. Also, in the httpd.conf, there should be a mapping that tells apache to hand of to tomcat (usually servlet/* and *.jsp). You need to make sure that the mapping in your web.xml matches something that apache will know to hand off.
Joined: Jul 12, 2002
Great reply. Thanks.
Let me give you a bit more detail...
Yes, Apache is configured to run with mod_jk.
Here's a detailed breakdown of my setup (works locally with Just Tomcat and no Apache, naturally...):
Here's the FORM tag from the Hello.jsp that calls the Servlet on it's ON SUBMIT button.
<form ACTION = "/TestServet/HelloWorld">
The actual server directory structure has the WEB-INF folder with web.xml, there's a directory in WEB-INF called classes in which there is the expected directory "TestServlet", in which there is a single class file "HelloWorld.class". This is the standard directory setup.
The Webapp is outside the Webapps folder so there is no "auto-discovery", but the domain is listed in SERVER.XML and is "read in" at Tomcat start time.
Other Java code runs fine on this site, including JDBC and other classes.