Mantis - Resin
Viewing Issue Advanced Details
1599 block always 02-03-07 16:28 02-12-07 10:12
kamleshjkl  
ferg  
normal  
closed 3.1.0  
fixed  
none    
none 3.1.1  
0001599: web.xml with 2.4 namespace parsing errors
I have a JSP application that uses web.xml v2.4

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" [^]
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [^]
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee [^]
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" [^]
    version="2.4">

...when deployed to Resin 3.1.1

I get

500 Servlet Exception

WEB-INF/web.xml:8: <description> is an unexpected tag (parent <web-app>
starts at 5).

6:
7: <display-name>User Sign In</display-name>
8: <description>User Sign In</description>
9:
10: <!-- Adding ServletContextListener -->

 Check for duplicate and out-of-order tags.
<web-app> syntax: (@id?, @version, @xsi:schemaLocation?,
                   (<context-param>*
                   & (<description>*, <display-name>?, <icon>?)
                   & <distributable>?
                   & (<env-entry>*, <ejb-ref>*, <ejb-local-ref>*, <service-ref>*, <resource-ref>*, <resource-env-ref>*, <message-destination-ref>*)
                   & <error-page>*
                   & <filter>*
                   & <filter-mapping>*
                   & <jsp-config>?
                   & <listener>*
                   & <locale-encoding-mapping-list>?
                   & <login-config>?
                   & <message-destination>*
                   & <mime-mapping>*
                   & <security-constraint>*
                   & <security-role>*
                   & <servlet>*
                   & <servlet-mapping>*
                   & <session-config>?
                   & <welcome-file-list>?))


I need a fix for this and a temporary work around.

I found this discussion listed below.

-------------
Re: web.xml with 2.4 namespace parsing errors

    * This message: [ Message body ] [ More options ]
    * Related messages: [ Next message ] [ Previous message ] [ In reply to ]

From: Robert Koberg <rob@xxx.com>
Date: Wed Apr 13 2005 - 15:57:48 PDT

Joseph Dane wrote:
> Titus Barik <titus@xxx.net> writes:
>
>
>>If that's the case, then should this be considered a bug in Resin or
>>not?
>
>
> IMO, that would be a bug.
>

I would agree. It is a choice:

<xsd:choice minOccurs="0" maxOccurs="unbounded">
...
</

which means it is more like how caucho handled the web.xml in the 2.1.x
versions.

best,
-Rob

Notes
(0001756)
ferg   
02-12-07 10:12   
server/4600

However, this is not a "block" since it's trivial to switch the order of the <description> and <display-name> in the web.xml. In all other cases in the JavaEE schema, the order of <description> and <display-name> is as Resin's error message reports, i.e. <description> comes before <display-name>.