Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It's not unusual for mappings to share a need for the same result. For example, if your application is secure, then many mappings might need to return "login" if the security check fails. Rather than define a common result in every action mapping, the framework lets you define global results.

Code Block
xml
formatxml
titlestruts.xml
borderStylesolid

{code:title=struts.xml|format=xml|borderStyle=solid}
   <global-results>
      <result name="login" type="redirect-action">Login</result>
      <result name="unauthorized" type="action-chain">Unauthorized</result>
   </global-results>
   <!-- other package declarations -->
</package>

...