On Fri, 4 Apr 2003, Adam Sherman wrote:
> Date: Fri, 04 Apr 2003 08:15:52 -0500 > From: Adam Sherman <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: RE: Linked Forwards? > > On 04/03/03 19:04:20 -0800 Craig R. McClanahan wrote: > > > If you are willing to ensure that all your Actions use the same forward > > name, you don't have to do anything at all to accomplish this goal. When > > you call ActionMapping.findForward(), Struts checks the local forward > > declarations first, and then the globals. So, if you say: > > > > return (mapping.findForward("mainMenu"); > > > > in your doSomethingAction, since you don't have a local definition for > > this forward you will automatically be using the global one. That way, > > you only have to change one path if the URI of the page to be executed > > changes. > > I am using this idea for some projects. > > My issue is that I want to be able to map "standard" results to various > pages. I've been using ActionMessages to give feedback to the user instead > of forwarding to a seperate "thank you" style page. > > So, for example, many of my actions forward back to the "list" page after > putting something informative in the ActionMessages. If the page authors > decide that some action needs to be forwarded to a specific page on > "failure", I want them to be able to simply change the "failure" forward to > something else. > Why don't you just create a local <forward name="failure"> inside the <action> for only those actions that need something different than the global one? For all other actions, the global one will be used. > Would this be difficult to implement? > I'm still not understanding why you cannot do what you want with Struts the way it is. > Thanks, > > A. > > -- > Adam Sherman Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]