I'm not sure I get you, but, can't you just alias the servlet's URL using
the <url-pattern> tag in your web.xml?

(Take a look at the DTD for web.xml, at,

    http://java.sun.com/j2ee/dtds/web-app_2_2.dtd

or in the JSDK spec.)

                                                            -- Bill K.


> -----Original Message-----
> From: Graeme Miller [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 23, 2001 2:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: Aliasing urls in Tomcat (without using Apache)
> 
> 
> Hi guys,
> 
> During development we would like to use Tomcat locally 
> without having an
> Apache front end, then only have an Apache front end proxy 
> passing to Tomcat
> when it goes into production.
> 
> We are running into problems with how to replicate the proxy pass
> functionality of Apache in Tomcat.  
> 
> Eg say we have a context of /context and in its base 
> directory there was a
> subdirectory called my_directory. To get rid of the context 
> out of the url
> in Apache for the public site we would just do the following 
> proxy pass
> 
> proxypass /my_directory http://localhost:8080/context/my_directory
> 
> where localhost:8080 is of course picked up by Tomcat.  This 
> would mean the
> url would look like
> http://mydomain.com/my_directory - much tidier than
> http://mydomain.com/context/my_directory
> 
> We cannot work out how to set up a similar arrangement in Tomcat.
> 
> Note: we are *not* asking how to make context=my_directory, 
> so we can't just
> add another context my_directory that maps through to the same base
> directory as context. 
> 
> Any ideas people?
> 
> Regards,
> 
> Graeme.
> 

Reply via email to