I just want to run a web project that has been configured in a maven project with the pom.xml. It uses the maven tomcat7-maven-plugin to deploy the web app artifact and all
The tomcat7-maven-plugin documentation says for
:
server.xml to use Note if you use this you must configure in this file your webapp paths.
I think this means that you have to insert a
element with the path of your war inside the
element, like so:
Where "webapp" is my generated war name. Apparently, appBase
is relative to target/tomcat
(and "webapps" seems to be the default value). docBase
is relative to appBase
so for simplicity I used the relative path to the build directory.
This is working for me, and without that
element I get a white page.
If you are using filtering you can probably replace docBase
by a property. However take care to exclude the server.xml (and tomcat-users.xml) from your war file!