You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Greg Huber <Gr...@ricoh.co.uk> on 2008/02/15 13:58:03 UTC
theme frontpage: getOutputStream() has already been called for this
response
Hello,
Now with the frontpage theme we keep seeing this error message in the log
file.
StandardWrapperValve:invoke - Servlet.service() for servlet jsp threw
exception
java.lang.IllegalStateException: getOutputStream() has already been called
for this response
at
org.apache.catalina.connector.Response.getWriter(Response.java:601)
at
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:196)
Have traced it to the index.jsp:
RequestDispatcher homepage =
request.getRequestDispatcher("/roller-ui/rendering/page/"
+frontpageBlog);
homepage.forward(request, response);
If the old redirect method is used this message goes away:
response.sendRedirect(request.getContextPath()+"/"+frontpageBlog);
Front page seems to work ok all the same.
Cheers Greg
Re: theme frontpage: getOutputStream() has already been called for
this response
Posted by Phillip Rhodes <mi...@cpphacker.co.uk>.
Greg Huber wrote:
> Hello,
>
> If the old redirect method is used this message goes away:
>
> response.sendRedirect(request.getContextPath()+"/"+frontpageBlog);
>
> Front page seems to work ok all the same.
I don't have an answer, but I'm glad you mentioned this. I was
experiencing a very similar problem, but it wasn't manifesting itself
until the Sitemesh filter tried to do a getWriter() on the response
and then it would blow up with an IllegalStateException. I wouldn't
have thought to try changing that back to using sendRedirect if I hadn't
seen this. At least it's a workaround, even if a little less elegant.
What's interesting though, is that I wasn't seeing my version of this
problem, then I started fiddling with index.jsp, and I started seeing
it. But when I reverted my local index.jsp back to the "stock" version
the problem persisted until I made the change you mention above.
Weird stuff. :-(
--
Phillip Rhodes
Chief Architect - OpenQabal
https://openqabal.dev.java.net
LinkedIn: http://www.linkedin.com/in/philliprhodes
Re: theme frontpage: getOutputStream() has already been called for this response
Posted by Dave <sn...@gmail.com>.
On Feb 15, 2008 7:58 AM, Greg Huber <Gr...@ricoh.co.uk> wrote:
> Now with the frontpage theme we keep seeing this error message in the log
> file.
>
> StandardWrapperValve:invoke - Servlet.service() for servlet jsp threw
> exception
> java.lang.IllegalStateException: getOutputStream() has already been called
> for this response
> at
> org.apache.catalina.connector.Response.getWriter(Response.java:601)
> at
> org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:196)
>
> Have traced it to the index.jsp:
>
> RequestDispatcher homepage =
> request.getRequestDispatcher("/roller-ui/rendering/page/"
> +frontpageBlog);
> homepage.forward(request, response);
>
>
> If the old redirect method is used this message goes away:
>
> response.sendRedirect(request.getContextPath()+"/"+frontpageBlog);
>
> Front page seems to work ok all the same.
Hmm... I wonder why I don't see that on Glassfish.
- Dave