This is probably not much use since I can't remember any of the
details whatsoevery, but I think you could do this with server-push
technology. Basically you set your page as a special content type
(text/multipart-html or something, you can probably look it up somewhere),
then you can send an entire HTML page and the browser will display it, but
keep the connection alive, so if you want to you can send it a second page,
a third etc. I think it might only work with netscape though, so probably
pretty pointless.
        Plus if you do it from a jsp page, it would be buffered, so you
would not see the first page until the log process had finished anyway.

Dave

-----Original Message-----
From: Mike Engelhart [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 17, 1999 2:47 PM
To: [EMAIL PROTECTED]
Subject: Long process (Rewrite)


Thanks for all the replies, but I don't think I posed my question in enough
detail.  While setting refresh headers certainly works for just moving to
another page, my situation is this:
I need to be able to partially process the request in a servlet before I can
tell whether or not I can continue with displaying the resulting JSP display
page (which is the page which takes a while to process).  It goes something
like this:

// get request parameters from form data, etc
RequestDispatcher rd = null;
req.setAttribute("resultBean", myBean);
setMyBeanData1()
setMyBeanData2()
if (isBeanDataCorrect())
{
   // right here is the only place I can forward to the "Please wait.." page
  // because all the data is correctly set in the bean
   callMethodWithLongProcessTime()
   rd = getServletContext().getRequestDispatcher("/jsp/finalresults.jsp");
   rd.forward(req, res);
}
else
{
    // otherwise I forward directly to the error page
    rd = getServletContext().getRequestDispatcher("/jsp/errorpage.jsp");
    rd.forward(req, res);
}

Thanks again for any help on this.

Mike
----------
>From: Colin Wilson-Salt <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Long process
>Date: Tue, Aug 17, 1999, 1:29 AM
>

> One trick is to display a page that has a meta refresh tag that refreshes
to
> your page that does all the work, that way you get whatever 'please
wait...'
> page you want, and your other page appears when it's ready.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
For JSP FAQ, http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
For JSP FAQ, http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to