You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Uri Shohet <Ur...@ams-sys.com> on 2002/02/28 16:49:19 UTC

configuring additional servlet path

Hi List,


I went through all (IMHO) tomcat documentation and haven't found a solution.

In Apache JServ I could make 2 servlet zones and map them as follows:

http://myhost/myproduct/servlet     -> /myproduct/run/servlet
http://myhost/myproduct/pubservlet  -> /myproduct/run/pubservlet

I need this because I want /myproduct/servlet/ servlets to be protected by 
username and password, and /myproduct/pubservlet to be unprotected (public - 
hence the name).

Now, in tomcat I've set up a Context /myproduct in server.xml

<Context path="/myproduct" docBase="/myproduct/run/web" debug="2"
                 reloadable="true" crossContext="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                     prefix="localhost_myproduct_log." suffix=".txt"
        	  timestamp="true"/>
</Context>

and moved all the files and dirs from /myproduct/run/servlet to 
/myproduct/run/web/WEB-INF/classes and all the servlets such as 
http://myhost/myproduct/servlet/Snoop are working fine.

My question is how can I set up /myproduct/pubservlet mapping so that when 
client calls http://myhost/myproduct/pubservlet/mypackage.MyServlet, tomcat 
will call /myproduct/run/pubservlet/mypackage/MyServlet.class 

Any help appreciated

Thanks in advance

-- 
Uri Shohet
A.M.S. Advanced Maintenance Systems Ltd.
E-Mail: Uri.Shohet@ams-sys.com
Tel.:   +972-2-5822477 Ext.884
Fax :	+972-2-5814448

Registered Linux User #166615 (http://counter.li.org)


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>