AppEngine下的RPC序列化策略文件
GWT / AppEngine RPC 接口正在困扰着我!我收到如下错误:
INFO:javax.servlet.ServletContext log:UserService:ERROR:未找到序列化策略文件“/55585D0849A4549E3FCE91B33725B02F.gwt.rpc”;您是否忘记将其包含在此部署中?
每次我启动 Devserver 时。我已在 appengine-web.xml
中正确设置了 public-root
(除了 .gwt.rpc
之外,应用程序的其余部分均正常运行) > 文件)。
<static-files>
<include path="**" />
<include path="**.nocache.*" expiration="0s" />
<include path="**.rpc" expiration="0s" />
<include path="**.cache.*" expiration="365d" />
</static-files>
<resource-files>
<include path="**.gwt.rpc" />
</resource-files>
我做错了什么?请帮忙!
The GWT / AppEngine RPC interface is eating at me! I get errors such as this:
INFO: javax.servlet.ServletContext log: UserService: ERROR: The serialization policy file '/55585D0849A4549E3FCE91B33725B02F.gwt.rpc' was not found; did you forget to include it in this deployment?
every time I start the Devserver. I have correctly set the public-root
in appengine-web.xml
(the rest of the application is served OK except for the .gwt.rpc
files).
<static-files>
<include path="**" />
<include path="**.nocache.*" expiration="0s" />
<include path="**.rpc" expiration="0s" />
<include path="**.cache.*" expiration="365d" />
</static-files>
<resource-files>
<include path="**.gwt.rpc" />
</resource-files>
What am I doing wrong? Help please!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经过一番实验后,我得出以下结论:
.rpc
文件包含在 appengine 部署(appengine-web.xml
文件)中,并注意缓存问题! (例如序列化策略的更改)appengine-web.xml
中使用public-root
标记:删除welcome 文件
(例如索引.html) 位于war
目录的/
中,并对 GWT 进行适当的更改以查找其文件更新 servlet
url-pattern
标签指向 GWT 生成的目录内war
目录对于关联的 servlet对于
tasks
(即web hooks
),不要更改因此,唯一需要了解 GWT 生成文件夹的地方位于
web.xml
中。当然,GWT项目的welcome-file
也必须进行改编。希望这对某人有帮助
After some experimenting, here is what I came up with:
.rpc
files included in the appengine deployment (appengine-web.xml
file) and beware of caching issues! (e.g. changes in serialization policy)public-root
tag inappengine-web.xml
: drop thewelcome file
(e.g. index.html) in/
of thewar
directory and make the appropriate change for GWT to find its filesUpdate the servlets
url-pattern
tags to point inside GWT generated directory inside thewar
directoryFor servlets associated with
tasks
(i.e.web hooks
), do not change theurl-pattern
Hence, the only place that requires some knowledge of the GWT generated folder resides in
web.xml
. Of course, thewelcome-file
of the GWT project must also be adapted.Hope this helps somebody
我在部署的 GAE 服务器上遇到了同样的问题,直到我为资源文件部分添加了 rpc include 后,错误才消失。这就是我最终得到的结果:
I had the same problem on the deployed GAE server and it wasn't until I added the rpc include for the resource-files section that the error went away. Here's what I ended up with: