我正在编写一个GWT-App,但是当我试图编译应用程序时,我遇到了问题。
Eclipse说:
at.htlpinkafeld.wps.Wps.gwt.xml
Loading inherited module 'at.htlpinkafeld.wps.Wps.gwt.xml'
[ERROR] Unable to find 'at/htlpinkafeld/wps/Wps/gwt/xml.gwt.xml' on
your classpath; could be a typo, or maybe you forgot to include a
classpath entry for source?
[ERROR] shell failed in doStartup method这是我的Wps.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='at.htlpinkafeld.wps.Wps.gwt.xml'/>
<!-- Specify the app entry point class. -->
<entry-point class='at.htlpinkafeld.wps.client.Wps'/>
<!-- servlet context - path is arbritray, but must match up with
the rpc init inside java class. Tomcat will listen for this
from the server and waits for rpc request in this context -->
<servlet class="at.htlpinkafeld.wps.server.MySQLConnection"
path="/MySQLConnection" />
<inherits name="com.google.gwt.user.theme.standard.Standard"/>
<inherits name="com.google.gwt.user.theme.chrome.Chrome"/>
<inherits name="com.google.gwt.user.theme.dark.Dark"/>
</module>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>我在哪里犯的错?
发布于 2014-01-14 09:08:57
首先,正如托马斯和埃尔霍斯在评论中所说的那样,<inherits name='at.htlpinkafeld.wps.Wps.gwt.xml'/>一行应该是<inherits name='at.htlpinkafeld.wps.Wps'/>。
第二。标记<servlet...>是非常受限和可能的,而不是您可以或想要使用的东西。以下是文档对servlet标记的看法:
该元素仅适用于GWT的嵌入式服务器端调试功能。 注意:从GWT 1.6开始,这个标记不再以开发模式加载servlet,而是必须在war目录中配置一个web.xml/web.xml来加载所需的servlet。
因此,您需要在web.xml中设置servlet配置,或者(取决于服务器的版本),您可以在gwt模块文件中使用@WebServlet注释而不是servlet。
https://stackoverflow.com/questions/21081173
复制相似问题