How can I deploy mywebapp-1.0.0.war to the $ TOMCAT_HOME / webapps directory with the / mywebapp context path using context.xml inside the war file on Tomcat 8?
I get back to work with Tomcat after a long time, starting with version 5. I am used to creating META-INF / context.xml inside my war file:
<?xml version="1.0" encoding="UTF-8"?> <Context path="/mywebapp"> ... </Context>
Maven creates a war file with this name: mywebapp-1.0.0.war
But when I deploy the war file in the $ TOMCAT_HOME / webapps directory, the context path will look like http: // localhost: 8080 / mywebapp-1.0.0 instead of http: // localhost: 8080 / mywebapp / .
I also see that $ TOMCAT_HOME / conf / Catalina / localhost is empty, instead of copying the xml file from the deployed war file.
I also added the deployXML = "true" file to $ TOMCAT_HOME / conf / server.xml
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" deployXML="true">
j2gl source share