Hi !
Your should use servlet mapping.
For example:

    <servlet>
        <servlet-name>
            MyServletName
        </servlet-name>
        <servlet-class>
            MyServletNameClass
        </servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>
            MyServletName
        </servlet-name>
        <url-pattern>
            /file.html
        </url-pattern>
    </servlet-mapping>

Best regards !
----- Original Message -----
From: "Lessault Jean-Luc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 21, 2001 11:33 AM
Subject: RewritingURL with Tomcat3.2.1


>
> Hi all,
> I am using Tomcat 3.2.1 with Apache 1.3
> and I have the following problem:
>
>
>   I want to rewrite a path from a form like  'http://host:port/file.html'
>   to something like
> 'http://host:port/ContextServlet/MyServletName?parameter=file.html').
>   (Note that  the program works when i use the  second URL form in the
> browser).
>   So that, as it seems that Tomcat doesn't want to use .htaccess file, I
> decided
>   to write the following instructions:
>
>     LoadModule rewrite_module module/mod_rewrite.dll
>     <IfModule mod_rewrite.c>
>      RewriteEngine On
>      RewriteBase /ContextServlet/
>      RewriteRule ^file.html
> /ContextServlet/MyServletName?parameter=file.html.
>     </IfModule>
>
>    in tomcat.conf or server.xml but with no result.
>
>  Any help will be greatly appreciate.
>

Reply via email to