GWT [WARN] 404 - GET /birgit.chat.Chat.nocache.js慧星 [英] GWT [WARN] 404 - GET /birgit.chat.Chat.nocache.js comet

查看:113
本文介绍了GWT [WARN] 404 - GET /birgit.chat.Chat.nocache.js慧星的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法得到一个彗星聊天的例子来运行。
i get this error

i can't get a comet chat example to run. i get this error


404 - GET /birgit.chat.Chat.nocache.js(127.0.0.1) 1413字节

[WARN] 404 - GET /birgit.chat.Chat.nocache.js (127.0.0.1) 1413 bytes

这就是我的web.xml的样子

this is how my web.xml looks like

<servlet>
<servlet-name>chatComet</servlet-name>
<servlet-class>net.zschech.gwt.comet.server.CometServlet</servlet-class>
</servlet>

<servlet>
<servlet-name>chatServiceImpl</servlet-name>
<servlet-class>birgit.chat.server.ChatServiceImpl</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>chatServiceImpl</servlet-name>
<url-pattern>/birgit.chat.Chat/chat</url-pattern>
</servlet-mapping>

这是我的Chat.gwt.xml

This is my Chat.gwt.xml

   <!DOCTYPE module SYSTEM "http://google-web-toolkit.googlecode.com/svn/trunk/distro-         source/core/src/gwt-module.dtd">
     <module >
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.gwt.user.theme.standard.Standard" />
<inherits name="net.zschech.gwt.comet.Comet" />
<servlet class="birgit.chat.server.ChatServiceImpl" path="/chat"/>
<entry-point class="birgit.chat.client.ChatEntryPoint" />
    </module>

这些是我使用的包

Those are packages i use

package birgit.chat.client;
package birgit.chat.server;

我认为路径出了问题,但我没有想法。

I think there is something wrong with path but i am out of ideas.

请帮忙。
谢谢。

Please help. Thank you.

推荐答案

首先,您应该在* .gwt.xml中重命名模块名称,模块具有< a href =https://stackoverflow.com/questions/2152699/what-does-rename-to-mean-in-the-module-tag-of-a-gwt-module>重命名为重命名模块的属性。之后,您可以使用重命名的模块名称引用您的* .nocache.html。

First you should rename your module name in your *.gwt.xml , module has rename-to attribute which renames the module. After that you can reference your *.nocache.html with renamed module name.

 <module rename-to="chatModule">
    <inherits name="com.google.gwt.user.User" />
    <inherits name="com.google.gwt.user.theme.standard.Standard" />
    <inherits name="net.zschech.gwt.comet.Comet" />
    <servlet class="birgit.chat.server.ChatServiceImpl" path="/chat"/>
    <entry-point class="birgit.chat.client.ChatEntryPoint" />
 </module>

以及您的html页面:

and in your html page:

<script type="text/javascript" language="javascript" 
src="chatModule/Chat.nocache.js"></script> 

这篇关于GWT [WARN] 404 - GET /birgit.chat.Chat.nocache.js慧星的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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