我安装了: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。
我创建了一个新的“Web 应用程序项目”。运行-> 运行方式... -> Web 应用程序:
http://127.0.0.1:8888/Exp.html?gwt.codesvr=127.0.0.1:9997
在那种情况下,我有:
向服务器发送名称:
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
网页.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>
当我编译我的应用程序并将“war”文件夹复制到 glassfish docroot 中时:E:\glassfish3\glassfish\domains\domain1\docroot\exp\
如果我尝试打开链接:http://localhost:8080/exp/Exp.html
我有错误:
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.
错误是:
com.google.gwt.user.client.rpc.StatusCodeException: 404 GlassFish v3 - 错误报告
HTTP 状态 404 -
类型状态报告
信息
描述请求的资源 () 不可用。
GlassFish Server 开源版 3.1.2.2