Sorry for the double post peeps.

When I asked:

>Do we even have access to
>'req' and 'res' the objects with "sendRedirect(URL)" or are they out of
>scope?

I meant:
Are the 'req' and 'res' forwarded or does the target Servlet get fresh
params?

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Kyle
Burke
Sent: Wednesday, February 28, 2001 12:55 AM
To: [EMAIL PROTECTED]
Subject: Re: fordward servlets


Although this will work just fine, it is less elegant than Robert's solution
of "RequestDispatcher.forward(request,response)".

I have always used "response.sendRedirect(URL)" when some sort of error
occurs within the currently executing Servlet.

Can anyone shed some more light on this topic?  Do we even have access to
'req' and 'res' the objects with "sendRedirect(URL)" or are they out of
scope?  Suppose I'll test it.

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Fabrizio Gianneschi
Sent: Tuesday, February 27, 2001 7:13 AM
To: [EMAIL PROTECTED]
Subject: Re: fordward servlets


At 12.44 27/02/01 +0100, you wrote:
>Hi,
>
>It's possible to send the http response to another servlet directly from
>the code (without displaying any HTML page), for example, if a condition is
>true?

use response.sendRedirect(URL)

Bye
Fabrizio

___________________________________________________________________________
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

___________________________________________________________________________
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

___________________________________________________________________________
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

Reply via email to