App Service Windows includes multiple versions of Tomcat. Sometimes, you may want to add custom configurations via web.xml file.
Before talking about how to change web.xml file in App Service windows, let's discuss "what is web.xml"?
Java web applications use a deployment descriptor file to determine how URLs map to servlets, which URLs require authentication, and other information. This file is named web.xml and resides in the app's WAR under the WEB-INF/ directory. web.xml is part of the servlet standard for web applications.
The default Servlet configurations is under ${catalina.home}/conf. For each webapp, the settings could be found under ${catalina.home}/webapps/ROOT/WEB_INF.
When tomcat deploys the application, it reads the generic configurations from conf/web.xml and then WEB-INF/web.xml in the web application.
It instructs the Tomcat which classes to load, what parameters to set in the context, and how to intercept requests coming from browsers.
There you specify:
Back to our topic, if you haven't defined a custom error page, you will the default page as below:
To add a custom error page, please follow below steps:
Please kindly note, configurations won't take effect if you add web.xml directly in Kudu site. Tomcats only reads the configurations from war file during startup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.