You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Billy Ng <ev...@hotmail.com> on 2002/07/26 04:10:57 UTC

redirect

This question may have asked so many time.  Would anybody tell me how to do redirect.  If I have 2 Action objects, The Action1 finsihes the business logic and want to rediect to Action2 to display the jsp page.  How can I do it?

Billy Ng

Re: redirect

Posted by Billy Ng <ev...@hotmail.com>.
I ddi try this <forward name="action2" path="/action2.do" redirect="true" />
in the struts-config.xml, it will hit the Action2's perform().  However, how
can I put the query string in the path?

Thanks in advance!

Billy Ng

----- Original Message -----
From: "Billy Ng" <ev...@hotmail.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Cc: <em...@methodpark.de>
Sent: Friday, July 26, 2002 10:40 AM
Subject: Re: redirect


> Sorry, I am a new Struts user and slow.  I need to hit the Action2's
> perform() from Action1's perform() to have further business logic to do.
> Also, I will have query string in the url.  If I only put the
> "redirect='true'" in the ?<forward> tag, it won't do the work.  Would you
> please tell me how to do it, thanks!
>
> Billy Ng
>
> ----- Original Message -----
> From: "Erich Meier" <em...@methodpark.de>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Friday, July 26, 2002 3:01 AM
> Subject: Re: redirect
>
>
> > On Fri, Jul 26, 2002 at 11:07:14AM +0800, Tuck Wai wrote:
> > > Hi,
> > >       ActionForward newAF=new ActionForward(<the url you will to
> > > redirect>);//for example 'yourAction.do?action=first'
> > >       newAF.setRedirect(true);
> > >       return newAF
> >
> > This won't work with the upcoming struts 1.1 release. You should better
> use
> > the "redirect='true'" attribute of the action statement in the
> > struts-config.xml.
> >
> > Erich
> >
> > > ----- Original Message -----
> > > From: "Billy Ng" <ev...@hotmail.com>
> > > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > > Sent: Friday, July 26, 2002 10:10 AM
> > > Subject: redirect
> > >
> > >
> > > This question may have asked so many time.  Would anybody tell me how
to
> do
> > > redirect.  If I have 2 Action objects, The Action1 finsihes the
business
> > > logic and want to rediect to Action2 to display the jsp page.  How can
I
> do
> > > it?
> > >
> > > Billy Ng
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> > >
> >
> > --
> > Dr. Erich Meier, Software Process Improvement
> > method park Software AG, Wetterkreuz 19a, 91058 Erlangen, Germany
> > Tel. +49-9131-97206-316  mailto:Erich.Meier@methodpark.de
> > Fax. +49-9131-97206-200  http://www.methodpark.de/
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: redirect

Posted by Billy Ng <ev...@hotmail.com>.
Sorry, I am a new Struts user and slow.  I need to hit the Action2's
perform() from Action1's perform() to have further business logic to do.
Also, I will have query string in the url.  If I only put the
"redirect='true'" in the ?<forward> tag, it won't do the work.  Would you
please tell me how to do it, thanks!

Billy Ng

----- Original Message -----
From: "Erich Meier" <em...@methodpark.de>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, July 26, 2002 3:01 AM
Subject: Re: redirect


> On Fri, Jul 26, 2002 at 11:07:14AM +0800, Tuck Wai wrote:
> > Hi,
> >       ActionForward newAF=new ActionForward(<the url you will to
> > redirect>);//for example 'yourAction.do?action=first'
> >       newAF.setRedirect(true);
> >       return newAF
>
> This won't work with the upcoming struts 1.1 release. You should better
use
> the "redirect='true'" attribute of the action statement in the
> struts-config.xml.
>
> Erich
>
> > ----- Original Message -----
> > From: "Billy Ng" <ev...@hotmail.com>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Friday, July 26, 2002 10:10 AM
> > Subject: redirect
> >
> >
> > This question may have asked so many time.  Would anybody tell me how to
do
> > redirect.  If I have 2 Action objects, The Action1 finsihes the business
> > logic and want to rediect to Action2 to display the jsp page.  How can I
do
> > it?
> >
> > Billy Ng
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
>
> --
> Dr. Erich Meier, Software Process Improvement
> method park Software AG, Wetterkreuz 19a, 91058 Erlangen, Germany
> Tel. +49-9131-97206-316  mailto:Erich.Meier@methodpark.de
> Fax. +49-9131-97206-200  http://www.methodpark.de/
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: redirect

Posted by Erich Meier <em...@methodpark.de>.
On Fri, Jul 26, 2002 at 11:07:14AM +0800, Tuck Wai wrote:
> Hi,
>       ActionForward newAF=new ActionForward(<the url you will to
> redirect>);//for example 'yourAction.do?action=first'
>       newAF.setRedirect(true);
>       return newAF

This won't work with the upcoming struts 1.1 release. You should better use
the "redirect='true'" attribute of the action statement in the
struts-config.xml.

Erich

> ----- Original Message -----
> From: "Billy Ng" <ev...@hotmail.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Friday, July 26, 2002 10:10 AM
> Subject: redirect
> 
> 
> This question may have asked so many time.  Would anybody tell me how to do
> redirect.  If I have 2 Action objects, The Action1 finsihes the business
> logic and want to rediect to Action2 to display the jsp page.  How can I do
> it?
> 
> Billy Ng
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
Dr. Erich Meier, Software Process Improvement
method park Software AG, Wetterkreuz 19a, 91058 Erlangen, Germany
Tel. +49-9131-97206-316  mailto:Erich.Meier@methodpark.de
Fax. +49-9131-97206-200  http://www.methodpark.de/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: redirect

Posted by Tuck Wai <tu...@hotmail.com>.
Hi,
      ActionForward newAF=new ActionForward(<the url you will to
redirect>);//for example 'yourAction.do?action=first'
      newAF.setRedirect(true);
      return newAF

regards

----- Original Message -----
From: "Billy Ng" <ev...@hotmail.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, July 26, 2002 10:10 AM
Subject: redirect


This question may have asked so many time.  Would anybody tell me how to do
redirect.  If I have 2 Action objects, The Action1 finsihes the business
logic and want to rediect to Action2 to display the jsp page.  How can I do
it?

Billy Ng


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>