You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Subhit <su...@quinnox.com> on 2003/05/08 12:54:33 UTC
RE: Invoking chain of Action derived classes
Fwd the request to other action classes in your struts-config classes like
below instead of fwding to jsps
<action path="/abc"
type="com.project.RSA"
validate="false">
<forward name="lmn" path="/lmn.do" />
<forward name="pqr" path="/pqr.do" />
<forward name="xyz" path="/xyz.do" />
</forward>
</action>
subhit
-----Original Message-----
From: Niket Anand [mailto:niket@noida.manystreams.com]
Sent: Friday, May 09, 2003 1:51 AM
To: Struts Users Mailing List
Subject: Invoking chain of Action derived classes
Hello,
I want to invoke chain of Action classes in series when a request come to
certain uri.
Can it be possible in Struts?
Suppose I request for some url like
http://localhost/foo/show.do
In struts-config.xml
<action path="/show" type="com.foo.actions.AppAction1" >
<forward name="success"
path="/applications.do?action=showapplications"/>
</action>
Here only one Action class (AppAction1) is invoked, but I want to have
series of Action classes that can be configured in config.xml.
OR something like If user want to request for same url and we can have
<action path="/show/first" type="com.foo.actions.AppAction1" >
</action>
<action path="/show/second" type="com.foo.actions.AppAction2" >
</action>
<action path="/show/third" type="com.foo.actions.AppAction3" >
</action>
So I want that any request for show/*, we can have series of Action classes
handling.
How it can be possible?
Any comments please.I am waiting for it.
Thanks,
Niket
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Invoking chain of Action derived classes
Posted by Subhit <su...@quinnox.com>.
As far as i know i dont think you can use chain of action classes without
calling struts-config.xml using struts. You can achieve this using servlet
APIs but i think not through struts.... because struts uses
struts-config.xml file to know which action class to invoke if a particular
request comes..
though using servlets APIs you can achieve this but i doubt using struts.
subhit
-----Original Message-----
From: Niket Anand [mailto:niket@noida.manystreams.com]
Sent: Friday, May 09, 2003 2:18 AM
To: Struts Users Mailing List
Subject: Re: Invoking chain of Action derived classes
Thanks Subhit,
but I think when I request as /abc, it will call com.project.RSA action
class and in that class I will have to call findForward("lmn"). Now it will
go to other pattern(/lmn) just like /abc. But I want to go through series of
Actions like first lmnAction second pqrAction and finally xyzAction, when I
call /abc.
Please make me more clear about it.
Thanks,
Niket
----- Original Message -----
From: "Subhit" <su...@quinnox.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, May 08, 2003 6:54 AM
Subject: RE: Invoking chain of Action derived classes
> Fwd the request to other action classes in your struts-config classes like
> below instead of fwding to jsps
>
>
> <action path="/abc"
> type="com.project.RSA"
> validate="false">
> <forward name="lmn" path="/lmn.do" />
> <forward name="pqr" path="/pqr.do" />
> <forward name="xyz" path="/xyz.do" />
> </forward>
> </action>
>
> subhit
>
> -----Original Message-----
> From: Niket Anand [mailto:niket@noida.manystreams.com]
> Sent: Friday, May 09, 2003 1:51 AM
> To: Struts Users Mailing List
> Subject: Invoking chain of Action derived classes
>
>
> Hello,
> I want to invoke chain of Action classes in series when a request come to
> certain uri.
> Can it be possible in Struts?
> Suppose I request for some url like
> http://localhost/foo/show.do
>
> In struts-config.xml
>
> <action path="/show" type="com.foo.actions.AppAction1" >
> <forward name="success"
> path="/applications.do?action=showapplications"/>
> </action>
> Here only one Action class (AppAction1) is invoked, but I want to have
> series of Action classes that can be configured in config.xml.
>
> OR something like If user want to request for same url and we can have
>
> <action path="/show/first" type="com.foo.actions.AppAction1" >
> </action>
> <action path="/show/second" type="com.foo.actions.AppAction2" >
> </action>
> <action path="/show/third" type="com.foo.actions.AppAction3" >
> </action>
>
> So I want that any request for show/*, we can have series of Action
classes
> handling.
>
> How it can be possible?
>
> Any comments please.I am waiting for it.
>
> Thanks,
> Niket
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Invoking chain of Action derived classes
Posted by Niket Anand <ni...@noida.manystreams.com>.
Thanks Subhit,
but I think when I request as /abc, it will call com.project.RSA action
class and in that class I will have to call findForward("lmn"). Now it will
go to other pattern(/lmn) just like /abc. But I want to go through series of
Actions like first lmnAction second pqrAction and finally xyzAction, when I
call /abc.
Please make me more clear about it.
Thanks,
Niket
----- Original Message -----
From: "Subhit" <su...@quinnox.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, May 08, 2003 6:54 AM
Subject: RE: Invoking chain of Action derived classes
> Fwd the request to other action classes in your struts-config classes like
> below instead of fwding to jsps
>
>
> <action path="/abc"
> type="com.project.RSA"
> validate="false">
> <forward name="lmn" path="/lmn.do" />
> <forward name="pqr" path="/pqr.do" />
> <forward name="xyz" path="/xyz.do" />
> </forward>
> </action>
>
> subhit
>
> -----Original Message-----
> From: Niket Anand [mailto:niket@noida.manystreams.com]
> Sent: Friday, May 09, 2003 1:51 AM
> To: Struts Users Mailing List
> Subject: Invoking chain of Action derived classes
>
>
> Hello,
> I want to invoke chain of Action classes in series when a request come to
> certain uri.
> Can it be possible in Struts?
> Suppose I request for some url like
> http://localhost/foo/show.do
>
> In struts-config.xml
>
> <action path="/show" type="com.foo.actions.AppAction1" >
> <forward name="success"
> path="/applications.do?action=showapplications"/>
> </action>
> Here only one Action class (AppAction1) is invoked, but I want to have
> series of Action classes that can be configured in config.xml.
>
> OR something like If user want to request for same url and we can have
>
> <action path="/show/first" type="com.foo.actions.AppAction1" >
> </action>
> <action path="/show/second" type="com.foo.actions.AppAction2" >
> </action>
> <action path="/show/third" type="com.foo.actions.AppAction3" >
> </action>
>
> So I want that any request for show/*, we can have series of Action
classes
> handling.
>
> How it can be possible?
>
> Any comments please.I am waiting for it.
>
> Thanks,
> Niket
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org