You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Koo <da...@cse.unsw.edu.au> on 2001/06/17 15:47:28 UTC

Re: How to configure prefix mapping to override extension mapping?

Hi Alexander,

I had a look at the specs (v2.2) and it says that while the servlet
containers are required to follow the mapping technique as outlined
(i.e. /TestServlet/* would be matched before /TestServlet/foo.jsp)
for web applications, it is not a requirement for other types of
representations (e.g. runtime); it is just highly recommended. It probably
just means tomcat handles them differently.. would this answer your question?

btw, I had a look at the the proposed final draft2 of v2.3, and the
mapping technique seems to have been made a requirement for
web containers.

dan

On Sun, Jun 17, 2001 at 01:34:29PM +0200, Alexander Kandzior wrote:
> 
> In short:
> /TestServlet: maps to my servlet (fine)
> /TestServlet/foo: maps to my servlet, "/foo" being delivered as path
> information (fine)
> /TestServlet/foo.jsp: Does not map to my servlet but to the JSP servlet
> (that's my problem)
> 
> Actually, the Servlet 2.2 Spec is not clear on this point. It dosen't say
> what's supposed to happen if there is a prefix match AND an extension match
> in the same URI. It seems that Tomcat finds both matches (I turend on the
> debug log), but for some inobvious reason then always uses the extension
> mapping. 
> 

-- 
<da...@cse.unsw.edu.au>
Computer Science and Engineering, UNSW