2
votes

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.

I created a new “Web Application project”. Run->Run As… -> Web application:

http://127.0.0.1:8888/Exp.html?gwt.codesvr=127.0.0.1:9997

In that case I had:

Sending name to the server:

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

web.xml:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><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">

  <!-- Servlets -->
  <servlet>
    <servlet-name>greetServlet</servlet-name>
    <servlet-class>ru.sample.Exp.server.GreetingServiceImpl</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>greetServlet</servlet-name>
    <url-pattern>/exp/greet</url-pattern>
  </servlet-mapping>

  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>Exp.html</welcome-file>
  </welcome-file-list>

  <servlet>
    <servlet-name>SystemServiceServlet</servlet-name>
    <servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class>
    <init-param>
      <param-name>services</param-name>
      <param-value/>
    </init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name>SystemServiceServlet</servlet-name>
    <url-pattern>/_ah/spi/*</url-pattern>
  </servlet-mapping>

</web-app>

When I compiled my application and copy “war” folder into glassfish docroot: E:\glassfish3\glassfish\domains\domain1\docroot\exp\

If I try to open the link: http://localhost:8080/exp/Exp.html I have the error:

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.

The error is:

com.google.gwt.user.client.rpc.StatusCodeException: 404 GlassFish v3 - Error report

HTTP Status 404 -


type Status report

message

descriptionThe requested resource () is not available.


GlassFish Server Open Source Edition 3.1.2.2

1
can you show mapping of web.xml file? - bNd
Why are you using war folder in url? put war content under exp folder direct or just rename war to exp. try localhost:8080/exp/Exp.html or localhost:8080/exp - bNd
@Bhumika it was a misprint in my post. Of course, I load a right html file, but server response is a 404 error. - Sergey Chepurnov
Can you use firebug to monitor the rpc request post and identify the discrepancy in the url w.r.t to what is set up in web.xml? - appbootup

1 Answers

0
votes

Just copying content to the root won't work. Try to build war file (not sure, but application's root could be also ok) and to place it to autodeploy folder. Here is the detailed description of deploy process. Please also check Glassfish logs, to be sure that application is deployed successfully.