On Tue, 9 Jul 2002, James Turner wrote:

> Date: Tue, 09 Jul 2002 04:16:42 -0400
> From: James Turner <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Doing a sendRedirect from an Action
>
> Question of the morning:
>
> I'm in an Action, and I decide that I need to redirect off the current
> application (say to cnn.com)  I can't do it with a forward because they
> only work inside the current application.
>
> My initial instinct is to do a response.sendRedirect inside the Action, but
> this brings up the question of what to return?  null?
>

Yes.  Return null from an action whenever you do a redirect, or otherwise
have already created the response (such as a dynamically generated image
or something like that).  The null return tells the controller servlet
that no forwarding is required.

> James

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to