The key [JAVAX] does not exist in the request scope

It’s app code and I haven’t looked at in a few years. My comments are pretty vague.

Did a quick lookup on javax.servlet.error.request_uri which lead me to this page.

https://tomcat.apache.org/tomcat-8.0-doc/servletapi/constant-values.html

From this page, I found the row for ‘javax.servlet.error.request_uri’

https://tomcat.apache.org/tomcat-8.0-doc/servletapi/javax/servlet/RequestDispatcher.html#ERROR_REQUEST_URI

“The name of the request attribute that should be set by the container when custom error-handling servlet or JSP page is invoked. The value of the attribute is of type java.lang.String.”

That said, this particular script is a 404redirect script. When tomcat can’t find a resource, it’s supposed to grab some information from the requested URL, parse, and do some functions before exporting the 404 page to the user.