在 Eclipse 中将 GWT 应用程序部署到 tomcat

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8330394/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:23:10  来源:igfitidea点击:

Deploying GWT app to tomcat in eclipse

eclipsegwttomcatdeployment

提问by maks

I want to use tomcat server in development mode with GWT. When I use embedded Jetty it deploys application to the current directory(where my war folder is located). So it generates all the files there. How can I configure eclipse to use tomcat server and all the deployment stuff to be copied to tomcat webapps directory. I have tried to use -noserveroption in Run conigurations, but it doesn't copy any resource from war directory to server deployment directory. Can I use tomcat server in such manner? P.S. i want to solve this problem withou ant or maven

我想在 GWT 的开发模式下使用 tomcat 服务器。当我使用嵌入式 Jetty 时,它会将应用程序部署到当前目录(我的 war 文件夹所在的位置)。所以它会在那里生成所有文件。如何配置 eclipse 以使用 tomcat 服务器和所有要复制到 tomcat webapps 目录的部署内容。我尝试-noserver在运行配置中使用选项,但它不会将任何资源从 war 目录复制到服务器部署目录。我可以以这种方式使用tomcat服务器吗?PS我想在没有ant或maven的情况下解决这个问题

采纳答案by Chris Cashwell

Using my own server in development mode instead of GWT's built-in Jetty instance

在开发模式下使用我自己的服务器而不是 GWT 的内置 Jetty 实例

You will need to copy the contents of the WAR folder over, but only once.

您将需要复制 WAR 文件夹的内容,但只需复制一次。

回答by Thomas Broyer

Have you looked at Eclipse WTP? It allows deploying to a server right from within Eclipse.

你看过 Eclipse WTP 吗?它允许直接从 Eclipse 内部署到服务器。

For a GWT project, you'd then, in addition, follow that recipe: http://code.google.com/eclipse/docs/faq.html#gwt_in_eclipse_for_java_ee

对于 GWT 项目,您还可以遵循以下方法:http: //code.google.com/eclipse/docs/faq.html#gwt_in_eclipse_for_java_ee