title: GWT(GXT 2.2.2) + Jetty = Ok. Glassfish = 404
body: <p>I installed: JDK 1.7.0_10, GWT 2.4, GXT 2.2.5, App Engine 1.7.0, Eclipse Indigo Service Release 2, Glassfish-3.1.2.2-windows-ml, WinXP SP3.</p>
  
  <p>I created a new “Web Application project”. Run->Run As… -> Web application: </p>
  
  <pre><code>http://127.0.0.1:8888/Exp.html?gwt.codesvr=127.0.0.1:9997
  </code></pre>
  
  <p>In that case I had:</p>
  
  <p>Sending name to the server:</p>
  
  <pre><code>GWT User
  
  Server replies:
  Hello, GWT User!
  
  I am running Google App Engine Development/1.7.0.
  It looks like you are using:
  Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20100101 Firefox/17.0
  </code></pre>
  
  <p><strong>web.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;&lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee                http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  
    &lt;!-- Servlets --&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;greetServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;ru.sample.Exp.server.GreetingServiceImpl&lt;/servlet-class&gt;
    &lt;/servlet&gt;
  
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;greetServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/exp/greet&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  
    &lt;!-- Default page to serve --&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;Exp.html&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  
    &lt;servlet&gt;
      &lt;servlet-name&gt;SystemServiceServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.google.api.server.spi.SystemServiceServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;services&lt;/param-name&gt;
        &lt;param-value/&gt;
      &lt;/init-param&gt;
    &lt;/servlet&gt;
  
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;SystemServiceServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/_ah/spi/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>When I compiled my application and copy “war” folder into glassfish docroot: E:\glassfish3\glassfish\domains\domain1\docroot\exp\</p>
  
  <p>If I try to open the link: <code>http://localhost:8080/exp/Exp.html</code>
  I have the error:</p>
  
  <pre><code>Sending name to the server:
  GWT User
  
  Server replies:
  An error occurred while attempting to contact the server. 
  Please check your network connection and try again.
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>com.google.gwt.user.client.rpc.StatusCodeException: 404 GlassFish v3 - Error
    report <h1>HTTP
    Status 404 - </h1><hr/><p><b>type</b> Status
    report</p><p><b>message</b></p><p><b>description</b>The requested
    resource () is not available.</p><hr/><h3>GlassFish Server Open Source
    Edition 3.1.2.2</h3></p>
  </blockquote>