WebWork 2 : Global results
This page last changed on Dec 13, 2004 by casey.
Global results allows you to define result mappings which will be used as defaults for all action configurations and will be automatically inherited by all action configurations in this package and all packages which extend this package. In other words, if you have the same result specified within multiple actions, then you can define it as a global result. global results example<package name="default"> .... <global-results> <result name="login" type="dispatcher"> <param name="location">login.jsp</param> </result> </global-results> <action name="foo" class="mypackage.fooAction"> <result name="success" type="dispatcher">bar.jsp</result> </action> <action name="submitForm" class="mypackage.submitFormAction"> <result name="success" type="dispatcher">submitSuccess.jsp</result> </action> ... </package> Same thing <package name="default"> .... <action name="foo" class="mypackage.fooAction"> <result name="success" type="dispatcher">bar.jsp</result> <result name="login" type="dispatcher">login.jsp</result> </action> <action name="submitForm" class="mypackage.submitFormAction"> <result name="success" type="dispatcher">submitSuccess.jsp</result> <result name="login" type="dispatcher">login.jsp</result> </action> ... </package> |
![]() |
Document generated by Confluence on Dec 14, 2004 16:36 |