tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Yunusov <>
Subject Re: HTTP Status 404 with Tomcat 4.1.18
Date Sat, 11 Jan 2003 15:03:08 GMT
On Saturday 11 January 2003 08:13 am, Nihita Goel wrote:
> I have added the Context information in server.xml as
> <Context path=""  docbase="ROOT" debug="0"/>
> <Context path="/myapp" docBase="myapp" debug="0"/>
> I checked the localhost log file and I can see messages
> Webapploader[/myapp]:Deploying class repositories to work directory
> $CATALINA_HOME/work/Standalone/localhost/myapp
> WebappLoader[/myapp]: Deploy class files /WEB-INF/classes to
> $CATALINA_HOME/webapps/myapp/WEB-INF/classes
> StandardManager[/myapp]: Seeding random number generator class
> StandardManager[/myapp]: Seeding of Random Number generator is complete
> StandardManager[/myapp:default]: Loading servlet default
> StandardManager[/myapp:invoker]:Loading container servlet invoker
> My class files are present in $CATALINA_HOME/Webapps/myapp/WEB-INF/classes
> directory and the web.xml is present in the WEB-INF directory....
> I still get the error HTTP Status 404 with description "the requested
> resource "/myapp/servlet/TestServlet" is not available.
> NG

You don't need to add a context for your webapp to server.xml. Add this to 
your webapp's web.xml:



Then try accessing the servlet with this URL:


Tomcat requires you to map all your resources like servlets to URL patterns. 
Before Tomcat 4.1.12 a special servlet called Invoker was automatically 
mapped to /servlet/* pattern and it invoked your servlets for you. You can 
find commented out lines related to that in the server's web.xml in the conf 
directory. If you want more info search this list and check out conf/web.xml.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message