Infinite Loop When Redirecting All Requests Via Default Servlet to a JSP
(Doc ID 1373579.1)
Last updated on JULY 03, 2020
Applies to:Oracle WebLogic Server - Version 10.3.4 to 126.96.36.199.0
Information in this document applies to any platform.
In this scenario, the servlet mapping for the jsp pages are done in web.xml using weblogic.servlet.JSPServlet.
Mapping for all requests to a particular servlet or JSP causes a loop between the default servlet and that resource.
The issue was seen by this particular customer when attempting to migrate from a different
container to Weblogic. They have an existing pageflow which is causing a problem for them.
The have mapping like the following:
What happens is that all request first goes to 'uds' servlet, which essentially works as a filter. This servlet runs some checks and then uses a named dispatcher to forward the request to weblogic.servlet.JSPServlet.
RequestDispatcher requestDispatcher = getServletContext().getNamedDispatcher("jsp");
They expect that JSPServlet will then invoke the generated servlet from the jsp page and not check the mapping again. This is how it has worked for them with Resin and Tomcat.
For example: http://<host>:<port>/index.jsp would first hit uds servlet, then JSPServlet and then invoke the servlet generated from index.jsp.
However, it appears that weblogic.servlet.JSPServlet does check the mapping again, and therefore it returns to 'uds' and causes an infinite loop. JSPClassServlet gives the same result.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document