users@glassfish.java.net

AW: Bug report!

From: Mohamed Maza <mohamed.maza_at_objectiveit.de>
Date: Thu, 14 Jul 2011 08:46:41 +0200

Hi,

yes, the Java(tm) Servlet Specification, version 3.0 states this, but you are using version 2.3 in your app:

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

Just change it to version 3.0 and your problem should be gone:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
      version="3.0">
...

</web-app>

Regards,
Mohamed

Von: Nikolay Stefanov [mailto:nstefanov_at_btu.bg]
Gesendet: Dienstag, 12. Juli 2011 10:40
An: users_at_glassfish.java.net
Betreff: Bug report!

Hello!
I was trying to deploy a Google Web Toolkit Sample Application(http://code.google.com/p/google-web-toolkit/downloads/detail?name=Tutorial-GettingStarted-2.1.zip) to GlassFish Server Open Source Edition 3.1 (build 43).
It didn't work.
The workaround I found was to swap the <servlet> and the <welcome-file-list> elements in \WEB-INF\web.xml (the deployment descriptor) .
But according to Java(tm) Servlet Specification, version 3.0(Specification: JSR-000315 Java(tm) Servlet Specification Version: 3.0 reva Release: 6 February 2011)( http://download.oracle.com/otndocs/jcp/servlet-3.0-mrel-eval-oth-JSpec/) on page 146:
"The web-app element is the root deployment descriptor for a Web application.........All sub elements under this element can be in an arbitrary order."
So I think that for the Glassfish server the order of sub-elements in web.xml do matters, which is not correct according the specification.
Buy!
Nikolay Stefanov