[Permit me to be blockheaded for a moment. I really want to understand this one since it seems it can really confuse users in a test vs production environment]

So if the webapp is precompiled I get one behavior, and if its not precompiled I get another behavior? (Scary)

In tomcat's root webapp, the servlet mapping is
<url-pattern>/index.jsp</url-pattern>

If the incoming url is "/". I thought this would trigger the welcome file logic to take place. The "container" will then look for any URI as defined by section 11.1 in the order defined by the welcome file list. The default from the tomcat's web.xml being:
/index.html
/index.htm
/index.jsp


In my case, index.html exists, so it should be served before index.jsp.

From 9.10 [Proposed Final Draft August 5th 2002]
The web server must append each welcome file in the order specified in the deployment descriptor to the partial request and check whether a resource in the WAR is mapped to that request URI. The web container must send the request to the first resource in the WAR that matches. The match is determined using the usual path mapping rules in Section 11.1.


Am I missing something more subtle?

-Tim

Remy Maucherat wrote:
No, I disagree with that. This is an exact match on a servlet (don't forget the webapp is precompiled, so there's a real mapping in web.xml in the root webapp), which takes precedence (the physical resource welcome file maps to the "/" servlet, so it has lowest priority).

Remy



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



Reply via email to