Jeanfrancois Arcand wrote:



Remy Maucherat wrote:

[EMAIL PROTECTED] wrote:

jfarcand    2004/08/25 12:25:46

Modified: util/java/org/apache/tomcat/util/http/mapper Mapper.java
Log:
Add missing case to support the following web.xml:
<servlet>
<display-name>ServletTest</display-name>
<servlet-name>ServletTest</servlet-name>
<servlet-class>test.ServletTest</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletTest</servlet-name>
<url-pattern>*.screen</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>welcome.screen</welcome-file>
</welcome-file-list>
All Servlet TCKs passed. Please review (I recall some discussion on welcome file but can't find those emails).


-1, this was on purpose. Extension mapping in welcome files cannot work.
Since you have no way of testing if the resource exists or not, the request will *always* be redirected to the welcome file. It also means that, with the default settings and mappings, all requests to a folder will end up being redirected to index.jsp. I thought this was obvious enough.


Not enough for me ;-). So if it's impossible, the spec should be updated, righ?

Sorry, I'm almost certain I had talked about it earlier: that's the reason for my comment.
I really don't see any way to implement it (if you find one ...), so IMO the spec is broken for extension mapping with welcome files (since they'll always match *.jsp with index.jsp - ok, I know, it's a static file, so there's a way to check in the special case).
For exact or wildcard mappings, there's no problem.


If you want more spec issues, let me know :)
(right now, I have session handling with cross context, and also request dispatching and wrapping)


Rémy


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to