Eclipse:从 Eclipse 启动 tomcat 服务器,不启动已部署的战争
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7857975/
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
Eclipse : Starting tomcat server from eclipse , does not start the deployed wars
提问by
I have configured Tomcat Server in Eclipse Helios IDE , and started the server in Debug Mode .
我已经在 Eclipse Helios IDE 中配置了 Tomcat 服务器,并在调试模式下启动了服务器。
This Server has already got a war file probe.war .
这个服务器已经有一个war文件probe.war。
My question is,why this application probe.war has not been started when i started the Server from Eclipse IDE ??
我的问题是,当我从 Eclipse IDE 启动服务器时,为什么这个应用程序 probe.war 没有启动?
This is the server console eclipse under the Eclipse IDE .
这是 Eclipse IDE 下的服务器控制台 eclipse。
Oct 22, 2011 12:31:56 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Oct 22, 2011 12:31:57 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 22, 2011 12:31:57 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 22, 2011 12:31:57 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47 config=null
Oct 22, 2011 12:31:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 401 ms
采纳答案by stivlo
WTP offers integration between Eclipse and Tomcat, if you're not using it, you're more on your own.
WTP 提供了 Eclipse 和 Tomcat 之间的集成,如果您不使用它,您就只能靠自己了。
As you said in the comment, you've manually placed the war file, but since you're starting Tomcat with Eclipse, the webapps
directory configured by Eclipse is not the same one you're using, so your application doesn't get deployed.
正如您在评论中所说,您已经手动放置了 war 文件,但是由于您使用 Eclipse 启动 Tomcat,因此 Eclipsewebapps
配置的目录与您使用的目录不同,因此您的应用程序没有得到部署。
To solve your problem either:
要解决您的问题:
- configure your application properly, so you can right click on it and choose
Debug As
->Debug on server
- or, configure it externally, by following the steps to debug a remote tomcat application, and start your tomcat server from the command line, so your war will get deployed.
- 正确配置您的应用程序,以便您可以右键单击它并选择
Debug As
->Debug on server
- 或者,在外部配置它,按照调试远程 tomcat 应用程序的步骤,并从命令行启动您的 tomcat 服务器,这样您的War就会被部署。