Ok, am I missing something, or is this just a case of lazy typing? As far as
I know, there is no such thing as a response.redirect method. There is a
response.sendRedirect method. If that's the method that you're talking about
here, then this question about whether or not it creates another thread is a
non-sequiter and shows a lack of understanding of exactly what's going on.
The sendRedirect method does just that: it SENDS a redirect directive to the
browser and, of course, the rest of the JSP is executed. But there's no
second thread on the server that "does the redirection code"; the actual
redirection is done by the browser. As Uwe Hanisch already noted, if it's
important to not execute the rest of the JSP/servlet, just put a return
statement after the sendRedirect call (you might want to put a call to
out.flush inbetween, just for completeness).

--Jim Preston


-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of John Doe
Sent: Wednesday, June 28, 2000 9:36 AM
To: [EMAIL PROTECTED]
Subject: Re: response.redirect


Can anyone please refer me to some concrete documentation on this.  I would
really like to know if this is true:  is there another thread created which
does the redirection code, while the current thread continues executing the
code on the current page?

thank you
rostom

--- "Mauro Gagni (EMS)" <[EMAIL PROTECTED]> wrote:
> Hi,
>  I had the same problem and that is the way it work, it compute the code
> until the end of the page.
> I noticed that it actually creates a new thread for the redirection, while
> the old one keeps executing until it eventually dies at the end of the
page.
>
> hope it did help,
> mauro
>
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of John Doe
> > Sent: 28 June 2000 02:40
> > To: [EMAIL PROTECTED]
> > Subject: response.redirect
> >
> >
> > Hello,
> > Can someone give a detailed explanation of how
> > response.redirect() works.  I
> > looked at the API and its not very detailed.
> >
> > The reason for this is that it seems that if I have html or java
> > code AFTER a
> > redirect on a JSP page, that code still gets executed.  This is not the
> > behavior i want.  With a forward I know that all execution stops
> > and a forward
> > takes place.  Is this not the case with a redirect??
> >
> > thanks in advance.
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get Yahoo! Mail - Free email you can access from anywhere!
> > http://mail.yahoo.com/
> >
> > ==================================================================
> > =========
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>


__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to