the same example works OK with jetty 7.1.6 and GlassFish 3.0.1...
And there's also a difference of behavior between tc7.0.4 and those 2 others :
Let's suppose we have the follwoing web.xml
<welcome-file-list>
<welcome-file>default.dummy</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<servlet-name>MyDummyServlet</servlet-name>
<servlet-class>test.MyDummyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyDummyServlet</servlet-name>
<url-pattern>*.dummy</url-pattern>
</servlet-mapping>
<servlet>
<description></description>
<servlet-name>MyDefaultServlet</servlet-name>
<servlet-class>test.MyDefaultServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyDefaultServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
When requesting the root of the context, tomcat 7 dispatches to MyDummyServlet
whereas jetty and glassfish use MyDefaultServlet. On this one I'd say tomcat is
right...
A clarification of the Expert Group on the servlet spec would be welcome !
Sylvain
On 17 oct. 2010, at 17:04, Sylvain Laurent wrote:
> Indeed, that's the problem I'm facing.
> After spending some time reading the spec and the comments in both bug
> reports, I'm inclined to believe that the current behavior of tomcat 7.0.4 is
> not spec compliant.
>
> I created a webapp that matches the example given in chapter 10.10 (Welcome
> files) of the spec. The files are the same, and my web.xml is like this :
>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> version="2.5">
> <display-name>testWelcomeFiles</display-name>
> <welcome-file-list>
> <welcome-file>index.html</welcome-file>
> <welcome-file>default.jsp</welcome-file>
> </welcome-file-list>
> <servlet>
> <description></description>
> <display-name>MyDefaultServlet</display-name>
> <servlet-name>MyDefaultServlet</servlet-name>
> <servlet-class>test.MyDefaultServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>MyDefaultServlet</servlet-name>
> <url-pattern>/</url-pattern>
> </servlet-mapping>
> </web-app>
>
>
> All the behaviors described in the spec are OK except this one :
> A request URI of /catalog/products/ will be passed to the “default”
> servlet, if any.
>
> Despite having declared a default servlet (as defined in section 12.2), it
> was not called when requesting catalog/products/ and I got a 404 instead...
>
> Sylvain
>
>
> On 16 oct. 2010, at 21:36, Mark Thomas wrote:
>
>> On 15/10/2010 22:01, Sylvain Laurent wrote:
>>> I just played with a Roo application and I get a 404 with 7.0.4 whereas the
>>> very same application works OK with 6.0.29.
>>> I'll try to investigate this week-end.
>>
>> Best guess without seeing the app is
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=49422
>>
>> Mark
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]