-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
When a SAM dispatches to a simple Servlet via an include, then after the SAM returns SUCCESS and the requested Servlet should be loaded, Undertow instead loads the include again.
For example, consider a request to a public Servlet mapped to /servlet, another Servlet mapped to /includedServlet and a SAM with the following code:
HttpServletRequest request = (HttpServletRequest) messageInfo.getRequestMessage(); HttpServletResponse response = (HttpServletResponse) messageInfo.getResponseMessage(); request.getRequestDispatcher("/includedServlet") .include(request, response); CallerPrincipalCallback(clientSubject, (Principal) null) }); return SUCCESS;
After this SAM has executed, Undertow will proceed to invoke /includedServlet for a second time instead of invoking the expected /servlet
A reproducer is available here: https://github.com/javaee-samples/javaee7-samples/tree/master/jaspic/dispatching