My Oracle Support Banner

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
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");

requestDispatcher.forward(request, response);

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

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.