Monday, February 15, 2010

StackOverflowError - Including a non-JSP Page

This happened to me when developing an application on Google App Engine (GAE SDK 1.3.1).

I tried to include a non-JSP page using standard <jsp:include page="/resources/news.xml"/> tag. There was no problem when testing on the local dev appserver (I only had to specify that the "news.xml" is a resource file in the appengine-web.xml). But when it was running on the production - real - GAE, I got the following error:


java.lang.StackOverflowError
at java.lang.String.startsWith(Unknown Source)
at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.setAttribute(Dispatcher.java:475)
at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.removeAttribute(Dispatcher.java:508)
at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.setAttribute(Dispatcher.java:488)
at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.removeAttribute(Dispatcher.java:508)
at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.setAttribute(Dispatcher.java:488)
at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.removeAttribute(Dispatcher.java:508)
...

When I renamed the "news.xml" to "news.jsp", then everything worked fine. Is it a bug or feature ?

1 comment:

  1. I´m facing, almost, the same problem. But my declaration is <%@ include = file"..." %>
    .. I already try it.. rename it. but this makes the problem less frequent.

    Some body knows what´s the problem?

    ReplyDelete