...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<action name="Hello"> <result>/hello/Result.jsp</result> <result name="error">/hello/Error.jsp</result> <result name="input">/hello/Input.jsp</result> </action> |
A special 'other' result can be configured by adding a result with name="*". This result will only be selected if no result is found with a matching name.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<action name="Hello">
<result>/hello/Result.jsp</result>
<result name="error">/hello/Error.jsp</result>
<result name="input">/hello/Input.jsp</result>
<result name="*">/hello/Other.jsp</result>
</action>
|
The name="*" is not a wildcard pattern, it is a special name that is only selected if an exact match is not found.
In most cases if an action returns an unrecognized result name this would be a programming error and should be fixed.
Global Results
Most often, results are nested with the action element. But some results apply to multiple actions. In a secure application, a client might try to access a page without being authorized, and many actions may need access to a "logon" result.
...