Scenario:
Using eclipse's embedded tomcat server to deploy a struts project:
Result: it fails to start.
Solution
Supposing that server's configuration is correct(addres, port, etc), check the war plugin configuration in the pom.xml file.
The current value:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
During a copy/paste from another project, the proper value was not set.
Switch to :
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
Result : problem fixed.
No comments:
Post a Comment