user9150771
user9150771

Reputation: 61

How to configure context path for Azure App service with Tomcat linux

Where can I find the tomcat installed directory on the azure app service through kudu console?

I have tried configuring the context path, by adding below in Application settings:

  1. Add VM argumnets to JAVA_OPTS -Dserver.servlet.context-path=/myapp
  2. Add environmental variable SERVER_SERVLET_CONTEXT_PATH=/myapp
  3. Adding in the application.properties file server.servlet.context-path=/myapp

Also tried with WebServeletCustomizer

Please provide some solution, the app is working fine locally through IntelliJ war deployment.

Tech stack: JDK 11, Tomcat 9, Springboot 2.6.x enter image description here

enter image description here

Upvotes: 0

Views: 1772

Answers (1)

VenkateshDodda
VenkateshDodda

Reputation: 5516

To test this i have created a web app which is running with runtime stack Java 11 and Java web server stack as Apache Tomcat 9.0.

I am able see the tomcat installed directory under the path /usr/local/tomcat and you can add the context path in the server.xml file which is present under /usr/local/tomcat/conf/server.xml

Refer to this documentation for more information about configuring tomcat java apps on app service

Upvotes: 1

Related Questions