You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by JB...@silenus.com on 2001/06/04 21:44:10 UTC

servlet-mapping tag

I need to modify my servlets url's so they don't include tomcat's default
'servlet' directory.  For example,

One servlet is in:
     c:\tomcat\webapps\dir1\WEB-INF\classes
therefore the url is:
     http://localhost/dir1/servlet/ServletName

I need the urls to not have the 'servlet' in it
(http://localhost/dir1/ServletName). I was told previously to add a
<servlet-mapping> to my web.xml file. Do I do this in %TOMCAT_HOME%
\conf\web.xml since I want it to apply to all servlets?

I have tried this and can't get it to work. Can somebody give me an
example?

Many Thanks,

Jason E. Brawner


RE: servlet-mapping tag

Posted by Martin van den Bemt <mv...@mvdb.com>.
Look for this in the server.xml and change the /servlet/ part. Don't know if
it works though, but trying never killed anyone ;-))

Mvgr,
Martin

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


> -----Original Message-----
> From: JBrawner@silenus.com [mailto:JBrawner@silenus.com]
> Sent: Monday, June 04, 2001 9:44 PM
> To: tomcat-user@jakarta.apache.org
> Subject: servlet-mapping tag
>
>
> I need to modify my servlets url's so they don't include tomcat's default
> 'servlet' directory.  For example,
>
> One servlet is in:
>      c:\tomcat\webapps\dir1\WEB-INF\classes
> therefore the url is:
>      http://localhost/dir1/servlet/ServletName
>
> I need the urls to not have the 'servlet' in it
> (http://localhost/dir1/ServletName). I was told previously to add a
> <servlet-mapping> to my web.xml file. Do I do this in %TOMCAT_HOME%
> \conf\web.xml since I want it to apply to all servlets?
>
> I have tried this and can't get it to work. Can somebody give me an
> example?
>
> Many Thanks,
>
> Jason E. Brawner
>
>