Re: redirect a page

"Mr. Cristian Romanescu" <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
This is strange since I tested the sample webpage I sent with both IE
& mozilla an enverything went fine...

At 04:09 PM 3/8/2003 +0200, you wrote:

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 - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.

___________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.