Home > Software design >  How can I stop Apache tomcat to log 404 errors in Application Insights? GET/* Error
How can I stop Apache tomcat to log 404 errors in Application Insights? GET/* Error

Time:04-21

I have deployed an angular application in a Tomcat app server in Azure App Service. In order to enable fallback into index.html I included a web.xml file inside /WEB-INFO folder with this content:

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>App</display-name>    
<error-page>
    <error-code>404</error-code>
    <location>/index.html</location>
</error-page>

Even though this solution works, I still see "GET/*" errors in Application Insights every time page refreshes.

enter image description here

Following Angular documentation, I have tried to include an .htaccess file in app service files with no luck. enter image description here

CodePudding user response:

  • Yes, Whatever the suggestions given by Olaf Kock are true there is nothing can be done my Tomcat with .htaccess as because Tom Cat is not Apache httpd.

  • Here is the Microsoft Document that refers installation of Tomcat Plus, add the application insights.

  • And this document describes different ways of Installation of Tomcat.

CodePudding user response:

We asked the Microsoft support team and we found out we shouldn't be deploying the Angular application into the app service but into other Azure service: Static Web Apps

  • Related