-
1. Re: Http error 404 servlet not found
tripperm Apr 23, 2003 2:28 PM (in response to grice96)I have a similar problem with JBoss 3.2.0 Tomcat 4.1.24. I have servlets and jsp pages bundled in a war file that is inside an ear file with other EJBs. I put the ear file in the deploy directory and statup JBoss. What is strange is that I can get to jsp pages that are in the war file, but when I attempt to make a call to one of my servlets directly, I get the 404 error.
This was all working fine with JBoss 3.0.2 and Tomcat 4.0.1. I imagine it is some configuration problem somewhere, but I have no clue where to start.
Any help would be appreciated. -
2. Re: Http error 404 servlet not found
tripperm Apr 23, 2003 4:22 PM (in response to grice96)I was able to solve my problem, and hopefully this will help anyone else coming across this thread. Between Tomcat 4.0.4 and 4.1.24 there was a change in the web.xml file. You now need to put a server mapping element in your web.xml file like so:
<servlet-mapping>
<servlet-name>YourServeletName</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
Once I did this, everything worked fine for me. -
3. Re: Http error 404 servlet not found
raja05 Apr 23, 2003 7:50 PM (in response to grice96)Shouldnt it be
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping> -
4. Re: Http error 404 servlet not found
yoyodyne Apr 25, 2003 6:40 PM (in response to grice96)what is invoker?
-
5. Re: Http error 404 servlet not found
raja05 Apr 25, 2003 11:39 PM (in response to grice96)From web.xml in conf directory of Tomcat distribution,
<!-- The "invoker" servlet, which executes anonymous servlet classes that have not been defined in a web.xml file. Traditionally, this servlet is mapped to URL pattern "/servlet/*", but you can map it to other patterns as well. -->
<servlet-name>invoker</servlet-name>
<servlet-class>
org.apache.catalina.servlets.InvokerServlet
......... -
6. Re: Http error 404 servlet not found
jonlee Apr 25, 2003 11:51 PM (in response to grice96)Note that the execution of anonymous servlets was removed from Tomcat 4.1.12 onwards as this is an identified security hole.