struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Information Guzzler" <info.guzz...@gmail.com>
Subject Re: Redirect with Struts 2
Date Mon, 08 Jan 2007 15:42:27 GMT
How about passing parameters along with the redirect?

On 1/8/07, Tom Schneider <schneidh@gmail.com> wrote:
>
> Interesting question.  I had the same question when I started looking at
> webwork.  Here's what I do when I need to redirect to a different
> domain.  If it's a static url, you can just hard code the full url in
> your struts.xml with a result type of redirect.  If it's dynamic,
> there's a little more work involved.  First you have a property on your
> action that is the url you want to go to.  Second, in your sturts.xml
> you have a result type of redirect, but the value is pulled from the
> OGNL stack.  For example:
>
> <result type="redirect">${nextURL}</result>
>
> nextURL is the property in your action that is populated dynamically.
> It's not trivial to figure out, but it works pretty slick.
> Tom
>
>
> Kamal C. Mettananda wrote:
> > Hi,
> >
> > I have seen that there has been an ActionForward class under Struts 1.xwhich could
be used for a redirect to a completely different domain URL. But
> how can we achieve the same with Struts 2.
> >
> > Thanks.
> >
> > Kamal
> >
> >
> >
> > Send instant messages to your online friends
> http://uk.messenger.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message