You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Graeme Miller <Gr...@AdvantageGroup.co.nz> on 2001/05/22 00:25:37 UTC

Aliasing urls in Tomcat (without using Apache)

We need a way of aliasing urls in tomcat 3.2.1 so we don't have to set up
Apache for local development on our workstations.

eg  /mytest needs to resolve to the servlet context /myproject/mytest  

Is there a way of doing this in Tomcat (perhaps in the server.xml or
web.xml?) without involving putting Apache at the front to do a proxy pass?

Regards,

Graeme.

RE: Aliasing urls in Tomcat (without using Apache)

Posted by Martin van den Bemt <mv...@mvdb.com>.
Kill apache, run tomcat on port 80 instead of port 8080. and then change
your server.xml to something like this :

        <RequestInterceptor
            className="org.apache.tomcat.request.InvokerInterceptor"
            debug="0" prefix="/servlet/" />

        <RequestInterceptor
            className="org.apache.tomcat.request.InvokerInterceptor"
            debug="0" prefix="/servlets/" />

(were using this in coop with apache and are serving the servlets under
http://<servername>/servlet http://<servername>/servlets
So this should (never tested it btw..) also run like this without apache.

Hope you get it working..

Mvgr,
Martin van den Bemt

> -----Original Message-----
> From: Graeme Miller [mailto:GraemeM@AdvantageGroup.co.nz]
> Sent: Tuesday, May 22, 2001 12:26 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Aliasing urls in Tomcat (without using Apache)
>
>
> We need a way of aliasing urls in tomcat 3.2.1 so we don't have to set up
> Apache for local development on our workstations.
>
> eg  /mytest needs to resolve to the servlet context /myproject/mytest
>
> Is there a way of doing this in Tomcat (perhaps in the server.xml or
> web.xml?) without involving putting Apache at the front to do a
> proxy pass?
>
> Regards,
>
> Graeme.
>