Maverick directly supports the idea that a command may have only one destrintation, and then streamlines its behavior. So we have some precedent under the "great minds" theory =:0)

ActionMapping.findForwards only brings back local forwards. So the "DefaultAction" could just forward to the first and only local forward, and perhaps throw an exception if there were not exactly one.

Something like

String[] forwards = mapping.findForwards();

if (1!=forwards.length) {
throw new RuntimeException("DefaultAction: Exactly one forward must be specified");
}


return mapping.findForward(forwards[0]);

-Ted.


Joe Germuska wrote:


At 16:51 -0700 8/8/03, David Graham wrote:

I'd like to get your thoughts (and others) on my proposal at the beginning
of this message. In short, we wouldn't use the parameter attribute nor
would we define "success" as the only correct forward name. SuccessAction
would forward to the first <forward> that's defined for it.


This sounds like a great compromise, seeing as it would be totally compatible with naming the forwards "success", as well as anything else. ( I tend to use "page" in the analogous case).

Joe


-- Ted Husted, Junit in Action - <http://www.manning.com/massol/>, Struts in Action - <http://husted.com/struts/book.html>, JSP Site Design - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to