<jsp:include flush="false> response.sendRedirect problem

From: carlisle411 (carlisle411_at_gmail.com)
Date: 02/27/05


Date: 26 Feb 2005 15:41:41 -0800

I am trying redirect to a specified URL via the following:

response.sendRedirect("http://foo.bar.com/");

Here is the actual code:

one.jsp
---------------------------------
<%@ page buffer="48kb" %>
<jsp:include page="two.jsp" flush="false" />

two.jsp
---------------------------------
<%@ page buffer="48kb" %>
<%
  response.sendRedirect("http://foo.bar.com/");
%>

I know that this used to be a problem because the output buffer would
be flushed before the run-time file got included. But it is my
impression that this should now work with JSP 2.0. I thought I could
specify flush="false" in as a jsp:include attribute to have the output
stream NOT flushed.

For what its worth, I am using Tomcat 5.0.28 on a Mac. Anyone know
what the problem is? Workarounds? Thanks.

-j