首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在类路径上找到“at/htlpinkafeld/Wps/Wps/gwt/xml.gwt.xml”

无法在类路径上找到“at/htlpinkafeld/Wps/Wps/gwt/xml.gwt.xml”
EN

Stack Overflow用户
提问于 2014-01-12 22:36:41
回答 1查看 798关注 0票数 0

我正在编写一个GWT-App,但是当我试图编译应用程序时,我遇到了问题。

Eclipse说:

代码语言:javascript
复制
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

代码语言:javascript
复制
<?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'/>

我在哪里犯的错?

EN

回答 1

Stack Overflow用户

发布于 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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21081173

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档