Hi
i have one requirment
I have one jsp page which has one button. now when you click that button it will call another JSP page which will call a function ( which is defined in a class)
now this function writefile will write my output to an excell sheet.
i collect the output in <html> and then use
out.print(buffer.toString())
now the problem is that .
when i click the button for the first time the excell sheet is not loaded , but if i click again the excell sheet will be laoded
now i thought flush.buffer will do my work
but can you tell me where should i write this
flush.buffer line
1)After my out.print(buffer.toString()) line in the function writefile
eg
public void writefile1(HttpServletResponse response, JspWriter out)throws IOException, DfException
buffer.append("</Table></body></html>");
out.print(buffer.toString());
response.flushBuffer();
-----------------------------------------------------------------
or in the JSP page
<%
SearchEx s = new SearchEx();
s.writefile1(response,out);
response.flushBuffer();
%>
i have one requirment
I have one jsp page which has one button. now when you click that button it will call another JSP page which will call a function ( which is defined in a class)
now this function writefile will write my output to an excell sheet.
i collect the output in <html> and then use
out.print(buffer.toString())
now the problem is that .
when i click the button for the first time the excell sheet is not loaded , but if i click again the excell sheet will be laoded
now i thought flush.buffer will do my work
but can you tell me where should i write this
flush.buffer line
1)After my out.print(buffer.toString()) line in the function writefile
eg
public void writefile1(HttpServletResponse response, JspWriter out)throws IOException, DfException
buffer.append("</Table></body></html>");
out.print(buffer.toString());
response.flushBuffer();
-----------------------------------------------------------------
or in the JSP page
<%
SearchEx s = new SearchEx();
s.writefile1(response,out);
response.flushBuffer();
%>