You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Juan Alvarado <ju...@yahoo.com> on 2003/11/20 18:57:50 UTC

ForwardAction with Redirect

Is there any way to configure
org.apache.struts.actions.ForwardAction
to do a redirect instead of a forward.

Thanks

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

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: ForwardAction with Redirect

Posted by Hubert Rabago <ja...@yahoo.com>.
There's not a whole lot of redirect support built in.
I use it a lot on my webapps and I'm interested in 
submitting code for more redirect support, but when 
I try to bring it up in the dev list, I don't get a 
response.  

Of course, I haven't contributed anything anywhere yet so 
I may be going about it the wrong way.  Perhaps the committers 
wanna see actual patch submissions before they take me 
seriously.  (Craig suggested starting a discussion first - 
http://jakarta.apache.org/site/contributing.html).
I'm close to having patches ready, so I'll see what
happens then.

I guess the lack of support for redirects can mean no 
one really uses redirects, or that the committers just
don't see a need for it (though it's among the requests 
with the most votes).  Obviously the committers know a 
lot about web app design or else Struts wouldn't be as
well accepted as it is, so I guess that means I need
to rethink some of the strategies I've been applying
over the years.

Anyway, you should think about submitting your new 
RedirectAction, too.  


--- Juan Alvarado <ju...@yahoo.com> wrote:
> 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 <ja...@yahoo.com> 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 <st...@reumann.net> 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
> > > 
> > > 
> > >


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

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: ForwardAction with Redirect

Posted by Juan Alvarado <ju...@yahoo.com>.
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 <ja...@yahoo.com> 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 <st...@reumann.net> 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:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 

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

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: ForwardAction with Redirect

Posted by Hubert Rabago <ja...@yahoo.com>.
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 <st...@reumann.net> 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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


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

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: ForwardAction with Redirect

Posted by Rick Reumann <st...@reumann.net>.
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org