tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul McGrath" <pmcgr...@squawkbox.co.uk>
Subject Servlet Mapping
Date Mon, 27 Nov 2000 10:17:03 GMT
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




Mime
View raw message