Julian, I was confused by your statement that some actions would need to invoke chain "A" while other actions would need to invoke chain "B". To assist you, I first suggested using a ChainAction. I realized that wouldn't allow a group of actions to invoke the same chain AND perform their own action activities. To help with that if actions must still execute() something locally, I added the suggestion of subclassing ChainAction and adding a common method so a group of actions could invoke the same chain while still performing individual work. I hope that explains my divergence into subclassing and method overriding in the original email.
On a personal note, I look at Struts Chain and I wonder, should I use Struts Actions or simply make my own chain command to execute chains based upon the action path? Which is better and which is the "path", I don't know. Maybe someone can answer that question for future versions of Struts. Regards, David -----Original Message----- From: Julian [mailto:[EMAIL PROTECTED] Sent: Thursday, December 16, 2004 10:06 AM To: Struts Users Mailing List Subject: RE: [Struts-Chain] Only one chain for entire request lifecycle? David, Comments inline: --- "David G. Friedman" <[EMAIL PROTECTED]> wrote: > Julian, > > If you just need to invoke a chain, you can make > your action be > "org.apache.struts.chain.legacy.ChainAction". Great thanks >If > you need some actions to > do chain "A" and some to do chain "B" THEN do > execute other logic in the > action, subclassing ChainAction might be the best > course. Your subclass > could have an execute() which calls super.execute(), > then calls your own > Java statements. Invoking different chains based on Action code is not what I had in mind. I think maybe I did not explain myself well enough. If I needed some actions to do chain "A" and some to do chain "B", why would I not do the following? <action path="/myactionA" type="org.apache.struts.chain.legacy.ChainAction" name="myform" scope="request" input="/mypage.jsp" parameter="chainA" action path="/myaction"> <action path="/myactionB" type="org.apache.struts.chain.legacy.ChainAction" name="myform" scope="request" input="/mypage.jsp" parameter="chainB" action path="/myaction"> I think we are on the same page and this is how one would do this. Correct me if I am wrong, but it seems the wonders of email have distorted the conversation ;) Thanks, Julian --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]