You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by mperreno <mp...@iismail.unil.ch> on 2001/10/23 22:21:15 UTC
servlets path in tomcat 3.3
Is it possible to use non-standard paths for servlet i.e. use map anything
after the context name to servlets:
www.foobar.com/foo/SnoopServlet
instead of
www.foobar.com/foo/servlet/SnoopServlet
I managed to do it with tomcat 3.2 but I can't do it with tomcat 3.3
thanks
--
mathieu perrenoud [iis]
Re: servlets path in tomcat 3.3
Posted by mathieu <ma...@kesako.ch>.
That's fine for a couple of servlets, but I have more than 6500 servlets, I
can't map them all by hand.
In Tomcat 3.2, the RequestInvoker had a prefix argument which could be used
to redirect matching paths to servlets
<RequestInterceptor
className="org.apache.tomcat.request.InvokerInterceptor"
debug="0" prefix="/servlet/" />
With prefix="/", I could forward any request to servlets without using
"/servlet/" in the url.
Where is the RequestInterceptor gone?
> Add a servlet-mapping to your web.xml file.
>
> <servlet-mapping>
> <servlet-name>
> SnoopServlet
> </servlet-name>
> <url-pattern>
> /SnoopServlet
> </url-pattern>
> </servlet-mapping>
>
> mperreno wrote:
> > Is it possible to use non-standard paths for servlet i.e. use map
> > anything after the context name to servlets:
> > www.foobar.com/foo/SnoopServlet
> > instead of
> > www.foobar.com/foo/servlet/SnoopServlet
> >
> > I managed to do it with tomcat 3.2 but I can't do it with tomcat 3.3
> >
> > thanks
> >
> > --
> > mathieu perrenoud [iis]
--
mathieu perrenoud [kesako]
Re: servlets path in tomcat 3.3
Posted by Carl Bacher <cb...@wellinx.com>.
Add a servlet-mapping to your web.xml file.
<servlet-mapping>
<servlet-name>
SnoopServlet
</servlet-name>
<url-pattern>
/SnoopServlet
</url-pattern>
</servlet-mapping>
mperreno wrote:
> Is it possible to use non-standard paths for servlet i.e. use map anything
> after the context name to servlets:
> www.foobar.com/foo/SnoopServlet
> instead of
> www.foobar.com/foo/servlet/SnoopServlet
>
> I managed to do it with tomcat 3.2 but I can't do it with tomcat 3.3
>
> thanks
>
> --
> mathieu perrenoud [iis]