I use the following code in a JSP file that I serve from AppEngine serlvet.
<script type="text/javascript" > var role = <%= request.getAttribute("role") %>; </script>
The variable is set from the Servlet using:
req.setAttribute("role", role ); req.getRequestDispatcher("index.jsp").forward(req, resp);
The code works fine when creating AppEngine, but on the local development server I immediately get the following:
Problem accessing /. Reason: INTERNAL_SERVER_ERROR Caused by: java.lang.StackOverflowError at org.mortbay.jetty.servlet.Dispatcher$ForwardAttributes.setAttribute(Dispatcher.java:438) at org.mortbay.jetty.servlet.Dispatcher$ForwardAttributes.setAttribute(Dispatcher.java:438) at org.mortbay.jetty.servlet.Dispatcher$ForwardAttributes.setAttribute(Dispatcher.java:438) at org.mortbay.jetty.servlet.Dispatcher$ForwardAttributes.setAttribute(Dispatcher.java:438) at org.mortbay.jetty.servlet.Dispatcher$ForwardAttributes.setAttribute(Dispatcher.java:438) at org.mortbay.jetty.servlet.Dispatcher$ForwardAttributes.setAttribute(Dispatcher.java:438) at org.mortbay.jetty.servlet.Dispatcher$ForwardAttributes.setAttribute(Dispatcher.java:438)
it continues as always. During debugging, I also see that the servlet code is called infinite.
I found several links to a similar problem with AppEngine products, but I did not find a working fix for the AppEngine development server.
Any idea?
source share