tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Yunusov <pyunu...@rogers.com>
Subject Re: HTTP Status 404 with Tomcat 4.1.18
Date Sat, 11 Jan 2003 22:10:44 GMT
On Saturday 11 January 2003 10:03 am, Paul Yunusov wrote:
> You don't need to add a context for your webapp to server.xml. Add this to
> your webapp's web.xml:
>
> <servlet>
>   <servlet-name>AnyNameWorks</servlet-name>
>    <servlet-class>TestServlet</servlet-class>
>  </servlet>
>
> <servlet-mapping>
>   <servlet-name>AnyNameWorks</servlet-name>
>   <url-pattern>/AnotherNameWorksHere</url-pattern>
> </servlet-mapping>
>
> Then try accessing the servlet with this URL:
>
> http://localhost:8080/AnotherNameWorksHere
>
> 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.
>
> Paul

Sorry there, the URL should be 
http://localhost:8080/myapp/AnotherNameWorksHere as your context name seems 
to be myapp.

Paul

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message