使用Tomcat 7在Openshift上部署显示空白页面

时间:2016-04-26 18:57:45

标签: spring git maven tomcat openshift

当我插入'git push origin master'命令启动Tomcat时,它会显示错误:

remote: [ERROR] Failed to perform 
org.apache.maven.plugins goal: maven-war-plugin: 2.1.1: war (default-war) on 
project sissopront: Error assembling WAR: webxml attribute is required (pre-
existing or WEB-INF / web.xml if executing mode in update)

如果我在pom.xml中插入插件maven-war-plugin <failOnMissingWebXml> false </ failOnMissingWebXml>

它成功定期编译,但显示白页,没有别的。

注意:我的战争改名为ROOT.war。我试图把标记'',但它显示错误,没有找到web.xml

1 个答案:

答案 0 :(得分:0)

maven-war-plugin的声明应该像

voucherCode

只需在redeemVoucherForm中创建一个包含内容

的基本web.xml
<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.1.1</version>
    <configuration>
        <outputDirectory>deployments</outputDirectory>
        <warName>ROOT</warName>
        <!-- Java EE 6 doesn't require web.xml, Maven 
            needs to catch up! -->
        <failOnMissingWebXml>false</failOnMissingWebXml>
    </configuration>
</plugin>