|
Yeah but if you work with ie then you
cannot flush data more than once.
And that happens when all processing
in the jsp ends.
As far as i know that's a problem
with ie, not the jsp itself.
Even if you change the AutoFlush
option ie will mess it up.
----- Original Message -----
Sent: Friday, March 07, 2003 1:30
PM
Subject: Re: redirect a page
This is how it's done: - Open the page below (sample.jsp..)
from a popup _javascript_...
The idea is to open the popup and below
you'll se: out.flush... So basically I flush the HTML generated (a picture
with an animation image for example....) then flush it to client then you
do your work... after your 10 inutes work :) is complete, you see that I do
an redirect again from JS....so the new generated page will be
displayed.... I cut the OT issues from my JSP, but you'' figure it
out.
========= SAMPLE.JSP================
<%@ page
import="..."%> <jsp:useBean id="formBean"
class="ro.finsiel.eunis.search.species.country.CountryBean"
scope="request"> <jsp:setProperty name="formBean"
property="*"/> </jsp:useBean>
<%//INCLUDE HEADER HERE
%> <[EMAIL PROTECTED] file="../../header.jsp"%> <[EMAIL PROTECTED]
file="../header.jsp" %> <SCRIPT
language='_javascript_'> <!-- function redirect()
{ window.resizeTo(640,480);
window.moveTo(10, 10);
window.location.replace('../../temp/<%=filename%>');
} //--> </SCRIPT>
<%// INCLUDE FOOTER HERE
%> <[EMAIL PROTECTED] file="../footer.jsp"
%> <%out.flush();%>
<%// PDF GENERATION LOGIC
%> <% System.out.println("Dumping data...");
pdfReport.writeData(); long msecs = Utilities.stopTimer();
System.out.println("done in " + msecs + " ms."); %> <SCRIPT
language='_javascript_'> <!-- redirect();
//--> </SCRIPT> <%
out.flush();%>
At 02:21 PM 3/6/2003 -0600, you
wrote:
Hi,
I have a servlet which would take a while to generate
the output and I was wondering if someone would let
me know how to show a "please wait" on browser until
the final output is complete.
code snippet would
be great.
-Alvin Chang
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of
the message "signoff SERVLET-INTEREST". Archives:
http://archives.java.sun.com/archives/servlet-interest.html Resources:
http://java.sun.com/products/servlet/external-resources.html LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html
--
http://www.freemail.gr - ������ �������� ������������ ������������.
|