Marco, What about still extending BaseAction then using ActionDispatcher? Attachment http://issues.apache.org/bugzilla/attachment.cgi?id=12768 from http://issues.apache.org/bugzilla/show_bug.cgi?id=31270
Joe, Yes, yes, I know. It's just that my home machine went offline and when it got back up I wanted to tackle some other tickets first. :) Hubert On 4/22/05, Marco Mistroni <[EMAIL PROTECTED]> wrote: > Hello all, > I am writing a small application using struts 1.3 > And commons-chain. > Currently, I have defined a BaseAction class which retrieves > Commands dynamically based on the path used > For example, calling /login will result in the action > Retrieving the command called /login > String name = mapping.getPath(); > System.out.println("Retrieving command for action"+ name); > Command command = catalog.getCommand(name); > > That works fine (or eventually can be improved, as suggested here > http://wiki.apache.org/jakarta-commons/CommonsChainAndSpringFramework > > But, what if my action extends DispatchAction? > > Best htat I could do was to create a BaseDispatchAction that retrieves > The command based on the parameter that triggers Dispatch's action > specific method. > That results in a code like this : > > String name = mapping.getParameter(); > String command = request.getParameter(name); > Command command = catalog.getCommand(name); > > Question: what's the best strategy to use for retrieving commands > For a DispatchAction? > Are there better (I hope) alternatives? > > Any comments are welcome... > > Thanx in advance and regards > marco > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]