On Wed, Jun 25, 2025 at 9:19 AM Mark Thomas <ma...@apache.org> wrote: > > All, > > Servlet 6.2 intends to address a long standing (more than 10 years) > issue with welcome files. Consider the following: > > - *.do is mapped to a servlet > - welcome files are index.jsp, index.do > > The intention is that the index.jsp page should be used if present and > index.do (which always maps to the servlet) used if it is not. However, > a strict reading of the servlet spec requires that a 404 is returned if > index.jsp is not present. > > Most containers have a workaround for this (Tomcat has > resourceOnlyServlets) but Servlet 6.2 intends to fix this properly by > introducing a new element, <welcome-servlet> > > The PR for the servlet specification that adds this new behaviour is > soliciting feedback. This is your opportunity to review the change > before it becomes part of the servlet specification. > > PR: https://github.com/jakartaee/servlet/pull/881 > > Issue: https://github.com/jakartaee/servlet/issues/20
Fixing this is a very good idea. The solution looks good. The downside is that it takes some careful reading to understand. I think the spec document should include the example you mention: <welcome-file>index.jsp</welcome-file> <welcome-file>index.do</welcome-file> vs: <welcome-file>index.jsp</welcome-file> <welcome-servlet>index.do</welcome-servlet> Rémy --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org