Why wouldn't you want to create a redirect? For ex for apache you can use:

Redirect /servlet_app http://www.foo.com/servlet_app/servlet

hth
*********************************************************************
* Boris Niyazov                Ph:  212-854-4094  Fax: 212-854-1749 *
* Systems Manager              Email: [EMAIL PROTECTED]             * 
* Columbia Law School          URL: http://www.law.columbia.edu     *
*********************************************************************                  
             




>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>list-help: <mailto:[EMAIL PROTECTED]>
>list-unsubscribe: <mailto:[EMAIL PROTECTED]>
>list-post: <mailto:[EMAIL PROTECTED]>
>Delivered-To: mailing list [EMAIL PROTECTED]
>From: Joe Krause <[EMAIL PROTECTED]>
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: The "servlet" prefix
>Date: Wed, 25 Apr 2001 13:30:54 -0700
>MIME-Version: 1.0
>X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
>
>How do you get rid of the "servlet" prefix that Tomcat appends to every
>servlet URL? I have a web site that is currently using jserv, but we are
>upgrading the server and I want to move the site over to tomcat. However,
>tomcat's default behaviour is to stick the work "servlet" in the URL between
>the context name and the servlet being accessed. This breaks all my HREFs.
>Instead of rewritting all the HREFs on 50 pages, I want tomcat to not use a
>the "servlet" prefix. I have tracked this default behaviour down to a couple
>of lines in the server.xml file.
> 
>        <!-- Non-standard invoker, for backward compat. ( /servlet/* )
>             You can modify the prefix that is matched by adjusting the
>             "prefix" parameter below.  Be sure your modified pattern
>             starts and ends with a slash.
> 
>             NOTE:  This prefix applies to *all* web applications that
>             are running in this instance of Tomcat.
>          -->
>        <RequestInterceptor
>            className="org.apache.tomcat.request.InvokerInterceptor"
>            debug="0" prefix="/servlet/" />
> 
>The problem is that when i remove this RequestInterceptor or make prefix=""
>or prefix="/" - i don't get access to the servlets and end up with a 404
>error. Has anyone seen this problem before? Can anyone help me?
> 
>Thanks for taking the time to read this!
> 
>Joe Krause

Reply via email to