gwt rpc -如何在tomcat服务器上部署gwt rpc servlet



我的windows xp服务器上安装了apache-tomcat-7.0.16和jdk1.6.0.25。我安装了eclipse,并从谷歌网站上复制了stockwatcher的程序。我将程序编译并在eclipse开发模式下运行,运行良好。eclipse创建war文件夹,并将这个war文件夹复制到apache-tomcat-7.0.16/webapps下。然后我通过输入http://localhost:8080:检查我的tomcat服务器,它正在工作并运行tomcat的servlet示例。然后输入http://localhost:8080/war/stockwatcher.html。给出一些java错误。然后是移动和复制,现在给错误页没有找到。

war文件夹的内容为图片stockwatcher- infstockwatcher.cssstockwatcher.html

我想我把文件复制到错误的位置,或者我必须配置tomcat

你说的这个java错误是什么?您确定GWT库位于WEB-INF/lib文件夹内吗?这些是GWT-RPC机制运行所必需的。

请浏览以下网站参考:

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/3408c38464c57d4a?pli=1

GWT应用程序-部署在Tomcat或任何其他servlet容器

不要使用war文件夹将GWT应用程序部署到tomcat。这是行不通的。程序如下:1) gwt首先编译项目。2)创建一个webbuilder.xml文件,并把代码放在下面。

<project name="ExceptionReport" basedir="." default="default">
    <target name="default" depends="buildwar,deploy"></target>
    <target name="buildwar">
        <war basedir="war" destfile="
                    ExceptionReport.war" webxml="war/WEB-INF/web.xml">
        <exclude name="WEB-INF/**" />
        <webinf dir="war/WEB-INF/">
            <include name="**/*.jar" />
        </webinf>
       </war>
     </target>
     <target name="deploy">
    <copy file="ExceptionReport.war" todir="." />
      </target>
</project>

exceptionreport是我的项目名。

3)导出src文件夹为JAR文件,保存在war>webinf>lib中。4)右键单击web builder文件,选择ant build选项。它将在项目中生成一个war文件。5)把war文件放到tomcat上。

最新更新