Reputation: 146
I have a spring boot application abc.myapp.war, that is deployed on external tomcat server. By default the tomcat uses the war file name as the context path of the application deployed so it becomes http://localhost:8080/abc.myapp, but I want to have a custom context path like http://localhost:8080/abc/myapp. I have read through other post they suggest using context tag in server.xml of tomcat, but there is not clear mention how to use it. Can anyone suggest any reference or way to change the context path of the application. Other ways of doing this are also welcome.
Upvotes: 2
Views: 2367
Reputation: 16045
If you want your app to appear with a context path of /abc/myapp
you don't have to write any context file, just rename the WAR file to abc#myapp.war
: the #
will be converted to /
(cf. Tomcat documentation for more examples).
Upvotes: 2