简体   繁体   English

Apache Tomcat 7-War文件未部署

[英]Apache Tomcat 7 - war file doesn't deploy

In my web application project I use intellij idea and run apache tomcat 7 through it. 在我的Web应用程序项目中,我使用intellij idea并通过它运行apache tomcat 7。 I already set the path variable to tomacat bin as CATALINA_HOME . 我已经将路径变量设置为tomacat bin作为CATALINA_HOME When I run it, the server is unable to deploy the war file. 当我运行它时,服务器无法部署war文件。 The last message that I can see in the idea is INFO: Deploying web application directory D:\\apache-tomcat-7.0.50\\webapps\\manager . 我在想法中可以看到的最后一条消息是INFO: Deploying web application directory D:\\apache-tomcat-7.0.50\\webapps\\manager

I found the issue. 我发现了问题。 When I run the tomcat7 with intellij idea, JRE_HOME is taken as the JDK path in the machine 当我以intellij的想法运行tomcat7时,JRE_HOME被当作机器中的JDK路径

Using JRE_HOME  "C:\Program Files\Java\jdk1.7.0_51"

But when I run the tomcat7 with command prompt it shows Using JRE_HOME "C:\\Program Files\\Java\\jre7" and deploy the war file successfully 但是,当我使用命令提示符运行tomcat7时,它显示Using JRE_HOME "C:\\Program Files\\Java\\jre7"并成功部署了war文件

So how can I set the jre path in intellij idea and solve this issue? 那么,如何在IntelliJ IDEA中设置JRE路径并解决此问题?

IntelliJ 13 introduced a new option named Use alternative JRE in the Server tab of your Tomcat run configuration. IntelliJ 13在Tomcat运行配置的“ Server选项卡中引入了一个名为“ Use alternative JRE的新选项。 For previous versions, you can still override the JRE_HOME variable . 对于以前的版本,您仍然可以覆盖JRE_HOME变量

Not sure this is the real cause of your problem, though... 不过,不确定这是否是造成您问题的真正原因。

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

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