部署到容器时,不会显示MySampleApplication clickme按钮

时间:2014-07-24 16:08:05

标签: gwt intellij-idea

我使用GWT构建了一个新项目。如果我在几秒钟之后从Intellij IDEA IDE运行该项目,那就是“点击”。控件出现在浏览器中,一切都按预期工作。

我为应用程序war文件创建了一个工件,该文件是在预期的../out/artifact文件夹中创建的。

当我将.war文件部署到apache tomcat,然后单击apache tomcat管理器中的webapp时,我只获取webapps / MySampleApplication文件位置下的文件列表。

如果我选择MySampleAppliacation.html文件,我会看到该html文件中的文字,但是' clickme'按钮永远不会出现。

我做了很多谷歌搜索但没有解决问题。我检查过,gwt-user.jar文件位于webapp的lib文件夹中。

这是GWT控制文件

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
    "http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src /gwt-module.dtd">
<module rename-to="MySampleApplication">
<!-- Inherit the core Web Toolkit stuff.                  -->
<inherits name='com.google.gwt.user.User'/>

<!-- Specify the app entry point class.                   -->
<entry-point class='com.mySampleApplication.client.MySampleApplication'/>


<!-- Specify the app servlets.                   -->
<servlet path='/MySampleApplicationService' class='com.mySampleApplication.server.MySampleApplicationServiceImpl'/>
</module>

这是项目html页面

<html>
<head>
    <title>Wrapper HTML for App</title>

    <link type="text/css" rel="stylesheet" href="MySampleApplication.css">

    <!--                                            -->
    <!-- This script is required bootstrap stuff.   -->
    <!--                                            -->
    <script type="text/javascript" language="javascript"
            src="MySampleApplication/MySampleApplication.nocache.js"></script>
</head>
<body>

<h1>Sample Application</h1>

<p>
    This is an example of a host page for the App application.
    You can attach a Web Toolkit module to any HTML page you like,
    making it easy to add bits of AJAX functionality to existing pages
    without starting from scratch.
</p>

<table align="center">
    <tr>
        <td id="slot1"></td>
        <td id="slot2"></td>
    </tr>
</table>
</body>
</html>

为了更好地衡量,这里是此项目的webapps下的所有文件

MySampleApplication\index.html
MySampleApplication\MySampleApplication
MySampleApplication\MySampleApplication.css
MySampleApplication\MySampleApplication.html
MySampleApplication\WEB-INF
MySampleApplication\MySampleApplication\0651E8A6D149EEF5E6386F087426CF0A.cache.html
MySampleApplication\MySampleApplication\0CE0D511D927FEB65BA6F6D96F24D2D4.cache.html
MySampleApplication\MySampleApplication\3C8C88AE707243315A0D688BD60B8CCA.cache.html
MySampleApplication\MySampleApplication\4A4AEE91A97252CBA376B9B27863F6ED.cache.html
MySampleApplication\MySampleApplication\644584634D68B773C08A73FA726669A5.gwt.rpc
MySampleApplication\MySampleApplication\clear.cache.gif
MySampleApplication\MySampleApplication\D003F7646BFEF3B8BE562132E77EFE59.cache.html
MySampleApplication\MySampleApplication\hosted.html
MySampleApplication\MySampleApplication\MySampleApplication.nocache.js
MySampleApplication\WEB-INF\classes
MySampleApplication\WEB-INF\web.xml
MySampleApplication\WEB-INF\classes\com
MySampleApplication\WEB-INF\classes\com\mySampleApplication
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client
MySampleApplication\WEB-INF\classes\com\mySampleApplication\MySampleApplication.gwt.xml
MySampleApplication\WEB-INF\classes\com\mySampleApplication\server
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplication$1.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplication$MyAsyncCallback.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplication.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplicationService$App.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplicationService.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplicationServiceAsync.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\server\MySampleApplicationServiceImpl.class

关于唯一的另一件事是IDEA项目模块设置......

我很感激或者你的帮助安迪。

0 个答案:

没有答案