【发布时间】:2013-11-08 15:41:31
【问题描述】:
我有一个问题让我抓狂:
我有一个 maven 项目,(play2 应用程序在 maven 项目中使用 play2war 插件)
当我启动 mvn tomcat7:run-war 或 tomcat:run-war(我更改 servlet 容器)时,这是 rsult:
[INFO] Running war on http://localhost:8090/arhswfe
[INFO] Creating Tomcat server configuration atC:\dev\projects\publicwebsite\sources\arhsweb\frontend\target\tomcat
[INFO] create webapp with contextPath: /arhswfe
Nov 08, 2013 4:30:55 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8090"]
Nov 08, 2013 4:30:55 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Nov 08, 2013 4:30:55 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.37
Nov 08, 2013 4:30:55 PM org.apache.tomcat.util.digester.Digester endElement
WARNING: No rules found matching 'Context/Logger'.
Nov 08, 2013 4:30:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8090"]
一切似乎都还好,但是当我在url 上测试时,它给了我404 和no logs,
在独立服务器中是可以的。
你有什么想法吗?我已经配置了所有可能的内容:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<tomcatLoggingFile>D:/log.txt</tomcatLoggingFile>
<warDirectory>${project.build.directory}</warDirectory>
<update>true</update>
<contextReloadable>true</contextReloadable>
<port>8090</port>
<warFile>arhswfe.war</warFile>
<ignorePackaging>true</ignorePackaging>
<contextFile>../configuration/context.xml</contextFile>
</configuration>
</plugin>
日志始终为空,没有错误,但 `404....
【问题讨论】:
-
不,它不能解决我的问题,当我把我的战争部署在一个独立的 tomcat 中时它是好的,我使用 playframework2.1.4 并且只有命令 mvn tomcat:run-war 给我一个 404 页面并且没有日志或 mvn tomcat7:run-war 这让我在这上面花了 2 天的时间......