Maven Tomcat Embedded
The documentation for the maven tomcat plugin here states The default context path is /${project.build.finalName}
, which itself defaults to /${artifactId}-${version}
.
The preferred way of changing the context path is to change the finalName by adding the following to your pom.xml:
<build> <finalName>mycontext</finalName></build>
Alternatively, a different context path can be specified by adding an explicit plugin configuration block to your pom.xml as follows:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <configuration> <path>/mycontext</path> </configuration></plugin>
If you've defined either of those two elements in your pom, then it should be loading at localhost:8080/wherever. Otherwise it'll be at localhost:8080/${artifactId}-${version}