tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schmitt, Christian" <>
Subject AW: Servlet mapping
Date Mon, 14 Aug 2000 13:05:57 GMT
yes, I tried that and that's working as well. But I probably didn't make
myself very clear.
What I want to achieve is that the servlet is found and called regardless of
the URL i.e.:
http://localhost/cs/some/directory/info  --> OK that works with the mapping
But what if I also want to find the servlet here:
OK, now I could map the servlet to this directory as well, but I don't want
to :-)

I read the Java Servlet Specificiation and in chapter 10.1 (page 47) it
1. The servlet container will try to match the exact path of the request to
a servlet.
2. The container will then try to recursively match the longest path prefix

I thought that this means that if I map a servlet like this:

the servlet should be called whenever the container finds 'info/*' in the


>How about the following (assuming that "/cs" is your context path):
>    <servlet-mapping>
>        <servlet-name>info</servlet-name>
>        <url-pattern>/some/directory/info/*</url-pattern>
>    </servlet-mapping>


View raw message