Juan,
Rick is right. All you need to do is set the redirect attribute of your
forward to "true" like in this example:

  <action path="/login" type="com.aaa.actions.DynaLoginAction"
name="dynaLoginForm" scope="request"    input="/pages/Welcome.jsp">
    <forward name="success" path="/loginSucceeded.jsp" redirect="true"/>
  </action>

You don't need to write your own ForwardAction at all.

This is pretty common.

-Richard


-----Original Message-----
From: Juan Alvarado [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 20, 2003 11:09 AM
To: Struts Users Mailing List
Subject: Re: ForwardAction with Redirect


Hi Hubert:

Thanks for the tip on that. I will give it a try.

I wonder why they just don't add this to the
distribution. It seems like a simple enough thing.

Take care


--- Hubert Rabago <[EMAIL PROTECTED]> wrote:
> It doesn't.  ForwardAction generates ActionForward
> objects specifying only the
> path and the contextRelative properties.
> 
> Juan, the good news is its easy to write your own.
> Just copy the ForwardAction
> code and add "retVal.setRedirect(true);" in the
> execute() method, then point your
> action mapping to that.
> 
> 
> --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > Juan Alvarado wrote:
> > 
> > > Is there any way to configure 
> > > org.apache.struts.actions.ForwardAction
> > > to do a redirect instead of a forward.
> > 
> > Hey Juan, what's up:)
> > 
> > Maybe I'm missing your question but in you action
> mapping you could just
> > add redirect="true". Would that accomplish what
> you need?
> > 
> > --
> > Rick
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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

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

Reply via email to