-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify expected behviour of fitlers and welcome files #7
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented 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 clarification I previously received from the Servlet 3.0 EG is that is is "/foo/index.html" that is compared against the filter mappings. It is this clarification I would like to see in the 3.1 spec. |
@glassfishrobot Commented |
@glassfishrobot Commented My colleague Shing Wai Chan pointed out that the proposed solution is Consider a slight variation of Greg's original example, where index.jsp Further assume that:
The proposed new algorithm would not find any matching static I guess there is nothing we can do to help in this case. It would be Comments? Jan and Greg's response to that was - Jan, I think this is indeed a problem, but I don't think there is much we can There is a fundamental problem of mixing the search semantics that I think that the current compromise is the best we can do if we Given that even appending the files may not work, I think we can't really fix it the way you are suggesting. |
@glassfishrobot Commented Regarding the the issues described in the extract of the Servlet 3.0 discussion I think that is a slightly different issue. In Tomcat we introduced a list of "resource only servlets" which essentially only get mapped to welcome files if a file resource (e.g. a JSP) exists at that URL. I do wonder if that container specific solution could be generalised (e.g by a new attribute on Servlet) but that is a discussion for a different issue / the mailing list. |
@glassfishrobot Commented |
|
@gregw As the default Servlet is a special case (implicitly configured) I feel it should not be part in the welcome file processing. In my mind the welcome file processing should a) look to see if the file is available within the web application if so use it, or b) look to see if there is an exact filter / servlet mapping done for the given request and if so use it, or c) see if an extension filter / servlet mapping is done and use it, or d) see if a prefix filter / servlet mapping is done and use it (excluding the default servlet here). |
And repeat this recipe for each configured welcome file |
The specification is not explicit regarding the order of welcome file processing and filter mapping. This has caused limited user confusion.
My own expectation is that welcome files are processed first and then filter mappings. Previous conversations with Servlet 3.0 EG members confirmed this. It would be help to get a short note of this added to the Servlet 3.1 spec.
The text was updated successfully, but these errors were encountered: