This is how 1. One action class and multiple methods in it (insert, Doinsert, update, DoUpdate, list, search etc) 2. All the action mappings use this class and call the different methods based on what is required. 3. The action mappings have additional parameters defined such as DAO, Bean class etc that are used in the base action class to do the actual processing. That way we don't keep creating multiple action classes.
We had to disable "/actionName!input.action" style since all our methods are in one action and the access control to these methods is done via the roles interceptor. Using input is possible and we use it elsewhere in the application, but there are some situations where I have to forward the error messages to a different action. Any reason why dispatch to an action wouldn't work? Thanks Anil -----Original Message----- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 10:32 AM To: Struts Users Mailing List Subject: RE: [S2] Result Type Dispatcher problem --- "Inamdar, Anil" <[EMAIL PROTECTED]> wrote: > Yes I tried with "redirect-action" and it works. But > I don't want a redirect as I lose my messages and > other data from the previous action Oh, I didn't notice that you said that in your original post. The default result type is "redirect". I don't know as you can redirect to an action w/o specifying "redirect-action". Once you redirect, of course you're going to lose request-scoped data. The way you have your actions defined isn't how I normally picture S2 flow working. Personally, I have a single action defined for a datatype (in general, anyway) and display the initial form via a "/actionName!input.action" link (or you could use wildcards, or whatever). If there's a validation issue, it goes back to !input by magic. If I have an error during execution (so my form submission action is either the default, or I put the method in the url like "/actionName!update.action" or whatever) I add a message and return INPUT which brings me back to my input (which in my case is a tile). That way I don't have to think about anything, it just works. Is there a particular reason you've set up your actions the way you have? d. ________________________________________________________________________ ____________ Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]