On Wed, 13 Mar 2002, Paul, Debra, & 4 Kids Mendelson wrote:

> Date: Wed, 13 Mar 2002 23:58:19 -0500
> From: "Paul, Debra, & 4 Kids Mendelson" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: replacing /servlet/ with /xxx/ in tomcat 4.0
>
> Thanks for the tip.  Unfortunately I am a bit dense.  What do I need to put
> arround the <servlet-mapping>...</servlet-mapping> construct to make it fit
> within the default tomcat web.xml?
>

Tomcat 4 does this in exactly the same way that Tomcat 3.2 did it -- the
"invoker" function is performed by a servlet that you select with whatever
mapping you want.  To make "/somethingelse/{servlet-name}" work instead of
"/servlet/{servlet-name}", you would change the entry in "conf/web.xml"
to this:

  <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/somethingelse/*</url-pattern>
  </servlet-mapping>

Alternatively, you could just *add* this new entry (instead of replacing
the old one) if you wanted it to work either way.

Craig McClanahan


> -----Original Message-----
> From: Christopher K.St.John [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 13, 2002 11:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: replacing /servlet/ with /xxx/ in tomcat 4.0
>
>
> "Paul, Debra, & 4 Kids Mendelson" wrote:
> >
> > In tomcat 3.2 I could map /servlet/ to /somethingelse/
> > ...
> > How do I do the equivalent in Tomcat 4.0?
> >
>
>  In conf/web.xml:
>
>    <!-- The mapping for the invoker servlet -->
>     <servlet-mapping>
>         <servlet-name>invoker</servlet-name>
>         <url-pattern>/servlet/*</url-pattern>
>     </servlet-mapping>
>
>  Change <url-pattern> to something else.
>
>  This will change the default for all the webapps.
> If you want to change the mapping for a single webapp,
> change  the entry in the appropriate WEB-INF/web.xml.
>
>
> --
> Christopher St. John [EMAIL PROTECTED]
> DistribuTopia http://www.distributopia.com
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to