DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26452>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26452

Welcome-file not forwarding to servlet





------- Additional Comments From [EMAIL PROTECTED]  2004-02-18 21:53 -------
I have faced the same problem. I have:
...
  <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>*.do</url-pattern>
  </servlet-mapping>
...
  <welcome-file-list>
    <welcome-file>Welcome.do</welcome-file>
  </welcome-file-list>

when I try:
http://host:port/
I get 404. if I try
http://host:port/Welcome.do works fine.

Servlet 2.4 specs says (on pdf version page 76):

"If a Web container receives a valid partial request, the Web container must
examine the welcome file list defined in the deployment descriptor. The welcome
file list is an ordered list of partial URLs with no trailing or leading /. The
Web server must append each welcome file in the order specified in the
deployment descriptor to the partial request and check whether a static resource
or servlet in the WAR is mapped to that request URI."

I think its pretty clear that servlet mapping should be applied to welcome-file
elements.

Also, if I change my dd to:

...
  <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>/Welcome.do</url-pattern>
  </servlet-mapping>
...
  <welcome-file-list>
    <welcome-file>Welcome.do</welcome-file>
  </welcome-file-list>

Everything works fine (so in this case, Tomcat is performing servlet mapping). 

It's definitely a bug.

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

Reply via email to