You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Paul McGrath <pm...@squawkbox.co.uk> on 2000/11/27 11:17:03 UTC
Servlet Mapping
Hi
I have several servlets which have been developed using a Apache JServe
setup. I'm moving over to Tomcat with Apache and which to use the packaged
servets that I already have. My problem is as follows:
The servlet:
/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/IsItWorkingServlet
works fine when called from Apache as
http://hostname/servlets/IsItWorkingServlet
I have another servlet which is packaged under a sub directory eg
/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/test/TestServlet
I also want to access this servlet from apache in this format:
http://hostname/servlets/TestServlet
I don't want to include the absolute path to the servlet otherwise this
would be a complete rewrite for my system. I have tried adding the following
under /usr/local/tomcat/webapps/ROOT/WEB-INF/web.xml:
<web-app>
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>test.TestServlet</servlet-class>
</servlet>
</web-app>
This is an attempt to get http://hostname/servlets/TestServlet calling the
TestServlet located under the sub directory of test.
Any help would be grately appreciated.
Best wishes
Paul