title: AppEngine Development Server gives StackOverflowError in JSP
body: <p>I'm using the following code in a <code>JSP</code> file which I serve from an <code>AppEngine</code> serlvet.</p>
  
  <pre><code>&lt;script type="text/javascript" &gt;
      var role = &lt;%= request.getAttribute("role") %&gt;;
  &lt;/script&gt;
  </code></pre>
  
  <p>The variable is set from a <code>Servlet</code> using:</p>
  
  <pre><code>req.setAttribute("role", role );
  req.getRequestDispatcher("index.jsp").forward(req, resp);
  </code></pre>
  
  <p>The code runs fine on AppEngine production but in the local development server I get the following straight away:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>this goes on like forever. While debugging, I can also see that the Servlet code is called endless times.</p>
  
  <p>I found a few references to a similar problem with AppEngine production but found no workable fix for AppEngine development server.</p>
  
  <p>Any idea ??</p>