Bug 27664 - Welcome files not found in combination with jsp-property-group
Summary: Welcome files not found in combination with jsp-property-group
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Unknown (show other bugs)
Version: 5.0.19
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-15 14:31 UTC by Ronald Wildenberg
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments
Demonstrates described behavior. (1.39 KB, application/java-archive)
2004-03-15 14:35 UTC, Ronald Wildenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Wildenberg 2004-03-15 14:31:35 UTC
My web.xml contains the following fragment:

   <welcome-file-list>
      <welcome-file>index.html</welcome-file>
   </welcome-file-list>
   <jsp-config>
      <jsp-property-group>
         <url-pattern>/notwelcome/*</url-pattern>
      </jsp-property-group>
   </jsp-config>

The URL's '<contextRoot>/notwelcome/' and '<contextRoot>/notwelcome' both do not
deliver the file 'index.html' that is located in the directory /notwelcome.
Instead they result in a 404. If I remove the jsp-property-group, the welcome
file is delivered.

I will attach a test war to demonstrate this behavior.
Comment 1 Ronald Wildenberg 2004-03-15 14:35:25 UTC
Created attachment 10787 [details]
Demonstrates described behavior.
Comment 2 Remy Maucherat 2004-03-15 14:37:09 UTC
I think we are not going to fix that.
Comment 3 Remy Maucherat 2004-03-15 14:43:46 UTC
I can conform this: the JSP servlet (which will handle all /notwelcome/* URLs)
will not handle welcome files.
Comment 4 Ronald Wildenberg 2004-03-15 15:02:52 UTC
That is not according to the JSP specification.

Nowhere in the spec it is stated that welcome files suddenly should not work any
longer if they happen to be inside a jsp-property-group. Specifying a
jsp-property-group with url-pattern '/*' now effectively disables all welcome
files in the application.

An example from the JSP spec (1-90):

<jsp-property-group>
   <url-pattern>/ja/*</url-pattern>
   <page-encoding>Shift_JIS</page-encoding>
</jsp-property-group>

The Japanese target audience would probably not be very happy with the fact that
any welcome files below '/ja/*' stopped functioning. I'm reopening this bug.
Comment 5 Remy Maucherat 2004-03-15 15:07:46 UTC
Developers know how to reopen bugs if somehow I'm wrong. Please don't waste my
time and yours for now.
Comment 6 Jan Luehe 2004-03-16 01:42:24 UTC
I'm working on a fix - stay tuned.
Comment 7 Ronald Wildenberg 2004-03-16 12:55:11 UTC
I found another problem with respect to jsp-property-groups and url-mappings.
See bug 27704.
Comment 8 Jan Luehe 2004-03-17 00:16:09 UTC
Fixed (I'll let the community decide if they want to go with this fix).

Notice that in your example, /notwelcome/index.html will be interpreted as a
JSP, as it matches the url-pattern of the jsp-property-group.