-
Enhancement
-
Resolution: Done
-
Major
-
2.0.17.Final
-
None
If a jsp includes static files and one is missing, there is no indication of which file is missing. There is only the generic 404 response and no log message.
For troubleshooting, it would help to have some indication of the missing file as a jsp may include several files.
A file FileNotFoundException is thrown as we'd expect from the DefaultServlet:
FileNotFoundException: /missingpage.html java.io.FileNotFoundException.<init>(FileNotFoundException.java:65) io.undertow.servlet.handlers.DefaultServlet.doGet(DefaultServlet.java:158) javax.servlet.http.HttpServlet.service(HttpServlet.java:687) javax.servlet.http.HttpServlet.service(HttpServlet.java:790) io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:81) io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:65) io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274) io.undertow.servlet.handlers.ServletInitialHandler.dispatchToServlet(ServletInitialHandler.java:219) io.undertow.servlet.spec.RequestDispatcherImpl.includeImpl(RequestDispatcherImpl.java:376) io.undertow.servlet.spec.RequestDispatcherImpl.setupIncludeImpl(RequestDispatcherImpl.java:311) io.undertow.servlet.spec.RequestDispatcherImpl.include(RequestDispatcherImpl.java:277) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:907) org.apache.jsp.hi_jsp._jspService(hi_jsp.java:93) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:790) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
But it's never logged. The FileNotFoundException is silently caught in the JspServlet, which just sets the 404 with no clarification since the INCLUDE_REQUEST_URI attribute was already removed from the request by this point:
HttpServerExchange.setStatusCode: 404 io.undertow.server.HttpServerExchange.setStatusCode(HttpServerExchange.java:1391) io.undertow.servlet.spec.HttpServletResponseImpl.sendError(HttpServletResponseImpl.java:136) org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:427) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:405) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347) javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
Perhaps the DefaultServlet should log the error for clarification in this include scenario?
- is cloned by
-
JBEAP-16126 [GSS] (7.2.z) UNDERTOW-1482 - No indication of missing included file
- Closed