Eclipse GWT示例问候项目RPC失败 [英] Eclipse GWT sample greeting project RPC failure

查看:187
本文介绍了Eclipse GWT示例问候项目RPC失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经和Eclipse一起工作了一段时间,但是当我(编译后)将'war'文件夹的内容复制到我的'Sites'文件夹时,突然间我的GWT项目不再运行mac。这是非常正常的工作,但现在我不断得到一个RPC失败 -


尝试联系服务器时发生错误。请检查
您的网络连接并重试。




我现在只是创建新的Google Web应用程序项目(他们已经建立了问候样本)当我在Eclipse中运行Debug或Run(使用Jetty然后默认),但是当我将战争复制到站点时,这仍然很好。



编辑 - 根据建议,我现在将应用程序移植到Tomcat7,它的工作正常。我仍然感到困惑的是为什么它在Mac上工作,但现在对配置感到满意。


Appengine版本:1.7.2 < br>
GWT版本:2.4.0

Eclipse版本:4.2(juno)
Java SE 6(MacOS X)


任何帮助非常感谢!

解决方案

Mac上的Sites文件夹允许使用Apache Web Server(http://httpd.apache.org/)提供的内容,它足够聪明地发送文件,并了解如何与可以在服务器上运行应用程序的各种模块进行通信。也就是说,您的用户的站点文件夹中没有任何文件将作为应用程序运行,至少使用默认配置。



此外,默认示例项目是以Java,并且意味着在Servlet容器上运行。有很多servlet容器(Tomcat,Jetty,JBoss),但Apache HTTP Server不是其中之一。我从来没有听说过一个作为apache模块运行的servlet容器,尽管至少有一个模块可以让apache轻松与Tomcat交谈。



因此,您会看到静态内容 - html,编译的JavaScript,样式和图像 - 但是当示例应用程序尝试与服务器通信时,它会失败,因为apache不是真正设计为运行服务器样品申请件。相反,请考虑下载Tomcat或Jetty的副本,并将war文件夹复制到其webapps /目录中,然后从那里进行投放。


I have been working with Eclipse for a little while now but all of a sudden my GWT projects don't run anymore when I (after compiling) copy the the content of the 'war' folder to my 'Sites' folder on the mac. This was working absolutely fine but now I keep getting an RPC Failure -

An error occurred while attempting to contact the server. Please check your network connection and try again.

I am simply creating new Google Web Application projects now (they have the greeting sample build in) and this still works well when I am within Eclipse running either Debug or Run (using the Jetty then be default) but NOT when I copy the war over to the sites.

EDIT - As per the recommendations I have now ported the app to Tomcat7 where it works fine. I am still puzzled as to why it was working on the mac but am now happy with the configuration.

Appengine version:1.7.2
GWT version:2.4.0
Eclipse version:4.2(juno) Java SE 6 (MacOS X)

Any help much appreciated!

解决方案

The 'Sites' folder on your Mac allows the contents to be served up using the Apache Web Server (http://httpd.apache.org/), which is smart enough to hand out files, and to know how to talk to various 'modules' that can run applications on the server. That said, no file served out of your user's Sites folder will be run as an application, at least with the default configuration.

Additionally, the default sample project is written in Java, and meant to be run on a Servlet Container. There are many servlet containers out there (Tomcat, Jetty, JBoss), but the Apache HTTP Server isn't one of them. I've never heard of a servlet container that runs as a module for apache, though there is at least one module out there that allows apache to easily talk to Tomcat.

So as a result, you are seeing the static content - the html, the compiled JavaScript, the styles and images - but when the sample app attempts to communicate with the server, it fails, because apache isn't really designed to run the server pieces of the sample application. Instead, consider downloading a copy of Tomcat or Jetty, and copying the war folder into their webapps/ directory, and serving from there.

这篇关于Eclipse GWT示例问候项目RPC失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆