users@glassfish.java.net

Problem with web.xml generated for GWT app on Glassfish 2.1

From: <glassfish_at_javadesktop.org>
Date: Wed, 17 Jun 2009 19:47:55 PDT

In an attempt to deploy a GWT application packaged as a WAR on Glassfish v2.1 I get the error message below. I don’t have this problem when I deploy the same file on Glassfish v3 Prelude. However, I’d like to deploy the application as part of an EAR file, so v3 is not an option for me at the moment.

Could someone enlighten me regarding the problem with my web.xml file?

[b]Error:[/b]

Exception occured in J2EEC Phaseorg.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".

com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [myapp_gwt_client] Line 24 Column 11 -- Deployment descriptor file WEB-INF/web.xml in archive [myapp_gwt_client]. The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:396)
        at
[snip...snip]


[b]Here is my web.xml file:[/b]


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>myapp_gwt_client.html</welcome-file>
  </welcome-file-list>
  
  <!-- Servlets -->
  <servlet>
    <servlet-name>greetServlet</servlet-name>
    <servlet-class>myapp.gwt.client.server.GreetingServiceImpl</servlet-class>
  </servlet>
  
  <servlet-mapping>
    <servlet-name>greetServlet</servlet-name>
    <url-pattern>/myapp_gwt_client/greet</url-pattern>
  </servlet-mapping>

</web-app>


I am using Glassfish 2.1, GWT 1.6.4, and the Google App Engine plugin for Eclipse.

Any help would be most appreciated.

-Christoph
[Message sent by forum member 'choashierhardt' (choashierhardt)]

http://forums.java.net/jive/thread.jspa?messageID=351738