[ 
https://issues.apache.org/jira/browse/WW-3610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13023310#comment-13023310
 ] 

Dustin Digmann commented on WW-3610:
------------------------------------

After some research, I think I understand the problem now. 
http://www.coderanch.com/how-to/java/IllegalStateException The paragraph just 
before the notes begin caught my attention. Seems like a legit explanation. 
Initially I thought it was odd S2 was not handling whitespace as I expected. I 
understand why now. I am closing this ticket and please forgive the 
un-researched assumptions.

> Newlines at the end of JSPs cause IllegalStateException
> -------------------------------------------------------
>
>                 Key: WW-3610
>                 URL: https://issues.apache.org/jira/browse/WW-3610
>             Project: Struts 2
>          Issue Type: Bug
>            Reporter: Dustin Digmann
>
> We created a new JSP recently.  It does not have a corresponding Action 
> class, straight JSP. This JSP was creating the following exception:
> java.lang.IllegalStateException: getOutputStream() has already been called 
> for this response
>       at org.apache.catalina.connector.Response.getWriter(Response.java:599)
>       at 
> org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:195)
>       at 
> org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:124)
>       at 
> org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:117) 
> ...
> Users did not seem to be affected.  This was in the background.
> After the last "%>" within this JSP there was a newline.  Removing this 
> newline removed the exception.
> Can an update be made to ignore EOF newlines and whitespace?
> Note: I do not have a shareable example at this moment.  I might be able to 
> put one together upon request.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to