java.io.IOException:Data has already been flushed to the client

hi,

will u please anyone tell about this exception? its very urgent to me?

i am getting exception when i ma forwarding a page in jsp.

exception is :

java.io.IOException : Data has already been flushed to the client.

my code where i am getting this exception is:

if(filled_var .equalsIgnoreCase("y"))

{

%>

<jsp:forward page="/editForm.jsp">

<jsp:param name="formNum" value="<%= formNum%>"/>

</jsp:forward>

<%

}

here i am getting that error. please help me to find a solution in this.

[613 byte] By [swaruparavia] at [2007-11-27 7:47:10]
# 1

A forward can only be performed if the "response is not committed". The response is committed when:

1) you do a forward

2) enough data is outputted for the buffer to be flushed

3) you flush the buffer manually (or you do an include with a flush="true" for example)

It must be either 2 or 3 in the case of a JSP. So if you output a lot of data before the forward, make sure you try to do the forward BEFORE you output all that data.

gimbal2a at 2007-7-12 19:28:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...