https://issues.apache.org/bugzilla/show_bug.cgi?id=47378





--- Comment #5 from Rex Wang <rwo...@gmail.com>  2009-07-13 01:57:23 PST ---
>From my point of view, I don't like the work around to create a dummy file to
help  request the servlet. The logic I prefer is:
1. scan welcome list from actual files. If one is found, use it.
2. If none are found, try servlet mappings, for example:
if there is a /Hello in weclome list:
  <welcome-file-list>
    <welcome-file>/Hello</welcome-file>
  </welcome-file-list>
we should find in the wel.xml to look if there is a <servlet-mapping> hold a
<url-pattern> that can match "/Hello", such as 
<url-pattern>/Hello</url-pattern> or <url-pattern>/*</url-pattern>

Any thoughts?

-Rex

(In reply to comment #1)
> You'll need a physical file called index.jspf as a "placeholder" for the 
> action
> to occur. The file placeholder can be 0 bytes if you want. Or you can write a
> filter to detect a directory is requested and forward to index.jspf.
> 
> The reason for needing a physical file is the servlet container is to allow 
> for
> multiple welcome file types. 
> 
> Imagine I had welcome files of index.jsp, then index.html, then index.htm.
> 
> Imagine I have a directory that is missing index.jsp, but has an index.html. 
> If
> I always tried to invoke index.jsp like the welcome file list says, then the
> JSP servlet will return a 404 since there is no mechanism in the servlet api 
> to
> defer that decision. 
> 
> IIRC - there are more discussions of this in the archives, but those talks are
> REALLY old.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to