> -----Original Message-----
> From: Marc Elliott [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 25, 2002 8:43 AM
> To: [EMAIL PROTECTED]
> Subject: Does redirect stop processing of originally-targeted jsp?
> 
> 
> In a nutshell:  I have a process the runs in a javabean/jsp 
> that takes a long
> time and I don't want the user to have to wait for process to 
> finish before
> getting a response. So, I want the user to start the process, 
> then move on
> and do other things on the site.
> 
> If I send the user to the jsp with the javabean, and redirect 
> to another
> page, will the process on that first jsp continue to run?  
> How do I separate
> the presentation of jsp pages from the process being run by the client
> javabean?  Is that possible.

        When you call response.sendRedirect, that only sets a response
header.  The JSP continues processing to the next statement and continues
until the end of the JSP page, a return command, or an exception is thrown -
all of which would stop execution of that JSP page.

        What you are really looking for is to use threads.  You will need to
start a thread and put it into the session or some other object that won't
be garbage collected.  I would advise you to understand threads before going
very far down this path - threads can be complicated and the problems that
they can cause are not always very straight forward and easy to debug.

        Randy

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to