This is why you don't put application logic into the view layer. Before you
'push' your data into the view, figure out if you want to do the redirect or


On Thu, Mar 25, 2010 at 7:49 AM, Aaron Freeman <>wrote:

>  We take some fairly lengthy queries (lengthy row based on row count), and
> push the data into hashmaps in JSTL pages.  After that sometimes we evaluate
> the hashmap and sometimes have to redirect the request to another page.  In
> 3.0.23 it works with no problems.  In 4.0.5 we get
> "java.lang.IllegalStateException: Can't sendRedirect() after data has
> committed to the client."
> The reason being, that the for loop is causing a ton of white space to be
> sent to be buffered up, and at some point a buffer size limit has been hit
> with only whitespace, causing Resin to then send the HTTP headers and commit
> the request.
> So in the for loop I can do this to "fix" the problem:
> <c:forEach items="${requestScope.getRewriteUrlsQuery.rows}"
> var="rewriteUrlsQuery">
>     <% response.reset(); %>
>     ....
> </c:forEach>
> The question is, is there a setting in the resin.xml where I can change the
> buffer size globally, or do we have to go to modify all JSPs that
> potentially have this problem?  Was the default commit point changed between
> 3.0.x and
> 4.0.x, or some other architecture change, as we have never seen this until
> now?*
> *
> Thanks,
> Aaron*
> *
> _______________________________________________
> resin-interest mailing list
resin-interest mailing list

Reply via email to