0

After reading that I shouldn't set the context in server.xml, I tried creating META-INF/context.xml. The Resource definitions are read ok but the path attribute is ignored.

<Context path="/webapps/uebersetzung" docBase="UebersetzungWeb">
    <Resource ....
</Context>

The war file is UebersetzungWeb and I want to set the context path to webapps/uebersetzung. (I am migrating a WebSphere app and the context path is hard-coded in many places)

So far, the only way I found to do this is to rename the war to webapps#uebersetzung before deployment.

Is this the correct way?

paul
  • 13,312
  • 23
  • 81
  • 144
  • 1
    Please see if this helps: [Tomcat 9 Context Path Change](https://stackoverflow.com/questions/39589451/apache-tomcat-9-0-0-m10-change-context-path-in-meta-inf-context-xml-not-working) – TechFree Jun 05 '19 at 10:55
  • @TechFree thanks. It seems to confirm my approach: "I personally found the easiest solution to be simply to name your WAR file appropriately" – paul Jun 05 '19 at 10:57

0 Answers0