tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Eastham" <andy.east...@gliant.com>
Subject Servlet Mapping Bug?
Date Tue, 14 Jan 2003 22:45:40 GMT
Hi,

I've just upgraded from Tomcat 4.0.4b1 and apache 1.3 using warp to Tomcat
4.1.18 and Apache 2.0.43 using mod_jk2.

I use a feature of servlet mapping in web.xml, where I map any request under
a particular directory to a single servlet.  My application is mapped from
Apache under the url "/control/" and I invoke myServlet with any request to
the "plots" subdirectory.  In the old configuration, the relevant part of my
web.xml looked like:

    <servlet-mapping>
        <servlet-name>
            myServlet
        </servlet-name>
        <url-pattern>
            /plots/*
        </url-pattern>
    </servlet-mapping>

However, in my new setup, I have had to change this to make it work:

    <servlet-mapping>
        <servlet-name>
            myServlet
        </servlet-name>
        <url-pattern>
            /control/plots/*
        </url-pattern>
    </servlet-mapping>

ie put the full URI in the url-pattern, not just the path relative to the
Tomcat application root.

This strikes me as less portable - if I change my url mapping from Apache,
I'll have to edit my web.xml, which wouldn't have been necessary before.  Is
this a bug, or has it really been changed to better comply with the Servlet
spec?

Best regards,

Andy Eastham



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message