edit 10/8/10 @ 8:20am est - since I can't make this work in prod, I'll try to make it fail in test.
edit 10/8/10 @ 4:30pm est - having a great time!!! NOT. Ok, hell continues. I learned earlier today that we're also running Apache httpd as a separate process. So we're thinking maybe we're not forwarding the request to Tomcat somehow. I am not running httpd in my test environment.
Edit 10/8/10 @ 8:20pm - found out that the server also had httpd running on it. httpd was only forwarding jsp requests to Tomcat. Apache was eating the servlet requests, trying to serve static pages (?) and failing of course. I hacked the bajezus out of worker2.properties to make httpd forward the requests. Ouch.
Tomcat 5.5, RedHat linux.
I created a servlet which of course runs fine in our test environment. I moved it to production and I fail with a 404 error. According to the catalina log the servlet seems to load properly.
I'm at wits end - I don't know how to troubleshoot this. It's almost like I have misspelled the servlet name somewhere.
Here's my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Pdf Servlet</display-name>
<servlet>
<servlet-name>pdf</servlet-name>
<servlet-class>com.thop.exp.PdfServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>pdf</servlet-name>
<url-pattern>/pdf</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
I am browsing to www.myurl.net/PdfServlet/pdf
. I believe I have this rooted correctly. and the name of the war file is PdfServlet.war.
Any ideas on a problem, or ideas on what I can do to get an idea?
Here's the log.
INFO: Installing web application at context path /PdfServlet from URL file:/mnt/san00/aaadata_root/ROOT/PdfServlet
Oct 7, 2010 11:32:50 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 7, 2010 11:32:50 PM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[aaa.net].StandardContext[]
Oct 7, 2010 11:32:50 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Oct 7, 2010 11:32:50 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 7, 2010 11:32:50 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Oct 7, 2010 11:32:50 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/25 config=/usr/share/tomcat5/conf/jk2.properties
Oct 7, 2010 11:32:50 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4325 ms