At work, we came across a really annoying problem upgrading some machines from Tomcat 4.1 to Tomcat 5.0
We have some servlet mapped on the servlet-mapping "/". It's supposed to handle an URL known as
/en/blah. Now, due to some rather odd customer requirements, we're also required to have a physical file
/en/blah/index.jsp, which, even more oddly, contains a redirect to
/en/blah/natter (instead of
When the user browses to
/en/blah/, Tomcat 4.1 calls the servlet. So does Resin 2.1.x. But Tomcat 5.0 opens up the welcome file
OK, I know it's not such a good idea to have two potential targets for a given URL that yield different results. But, I'm curious whether either behaviour is mandated by the Servlet specs? Or is it simply undefined?
My reading of the 2.4 specs says that the "/" servlet is the default servlet, and welcome files have higher priority. However, this may not have been the case in earlier specs. But looking at the changes in the back of the 2.4 specs, they don't seem to mention anything like that. Or maybe I'm missing something.