jsr340-experts@servlet-spec.java.net

[jsr340-experts] welcome files and filters

From: Rajiv Mordani <rajiv.mordani_at_oracle.com>
Date: Fri, 29 Jun 2012 00:15:56 -0700

Mark has filed an issue on JIRA -
http://java.net/jira/browse/SERVLET_SPEC-7 which basically is about
clarifying the behavior for filters with welcome files. In the example
with the filed issue - he has

If a user requests "/foo" and "/foo" is a directory, the welcome files
"index.jsp" and "index.html" are configured and "index.html" is present
then what is compared against the filter mappings. Is it "/foo" or
"/foo/index.html".

The suggestion is to go with the filter mapping should be compared to
/foo/index.html and not /foo.

I think that this is a reasonable expectation - what do others think?
However the question that I have (and I don't think this is clarified in
the spec either) is what happens in the case where there is no welcome
file and the default servlet is invoked. Should the filter mapping in
that case be compared to /foo or /foo/<DefaultServlet>. I think it
should still be /foo/<DefaultServlet> but would like to get input from
others.

Comments / Suggestions?

- Rajiv