简体   繁体   English

将示例GWT应用程序部署到Tomcat

[英]Deploying sample GWT app to Tomcat

I'm trying to deploy a very basic GWT app to tomcat and running into problems. 我正在尝试将一个非常基本的GWT应用程序部署到tomcat并遇到问题。 I took the sample GWT project in eclipse, tested it to make sure it ran, then right clicked and selected google > gwt compile. 我在Eclipse中使用了示例GWT项目,对其进行了测试以确保其运行,然后右键单击并选择google> gwt compile。 I then took the war file, zipped it up and renamed it gwtproject.war. 然后,我拿到war文件,将其压缩并重命名为gwtproject.war。 I then went into tomcat and slected deploy from the menu, and deployed the project. 然后,我进入了tomcat,从菜单中选择了部署,然后部署了项目。 Yet every time I navigate to localhost:808/GwtProject I get a 404 error. 但是,每次我导航到localhost:808 / GwtProject时,都会收到404错误。

From what I've gathered reading several posts this looks like its an .xml configuration issue. 从我收集的几篇文章中可以看出,这看起来像是一个.xml配置问题。 I have not changed the default xml file nor its location, but do I have to modify it and move it up to the root folder? 我没有更改默认的xml文件或其位置,但是是否需要对其进行修改并将其移至根文件夹? If so, what exactly do I have to modify in it? 如果是这样,我到底需要修改什么? This is my first time working with tomcat, and while I read the documentation I'm still at a loss, thanks for the help! 这是我第一次与tomcat一起工作,在阅读文档时,我仍然感到茫然,感谢您的帮助!

The problem is with this step: 问题在于此步骤:

I then took the war file, zipped it up and renamed it gwtproject.war 然后,我拿了war文件,将其压缩并重命名为gwtproject.war

Do not make the war file zip and rename to war, because that is a war file in a non war file :) war file has manifest, zip not. 不要将war文件压缩并重新命名为war,因为那是非war文件中的war文件:) war文件具有清单文件,而zip没有。

Just take the original war file ( without zipping) and deploy that one. 只需获取原始war文件(无需压缩)并部署该文件即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM