Re: redirect a page
minos <[email protected]>
| Newsgroups | gmane.comp.java.sun.servlet,gmane.spam.detected |
|---|---|
| Message-ID | <001301c2e57c$4f663940$d9808c96@minos> |
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 ----- From: Mr. Cristian Romanescu To: [email protected] 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 %> <%@include file="../../header.jsp"%> <%@include 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 %> <%@include 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 - äùñåÃà õðçñåóÃá çëåêôñïÃéêïý ôá÷õäñïìåÃïõ.