Home > Guides > Core Developers Guide > Configuration Elements > Unknown Handlers |
Unknown Handlers are classes that implement the com.opensymphony.xwork2.UnknownHandler
interface, and are called by the framework, when an unknown action, result, or method are executed. To define an unknown handler, create a class implementing the mentioned interface, and add a bean definition to your struts.xml:
Multiple unknown handlers can be defined, using the unknown-handler-stack tag:
When multiple unknown handlers are stacked like above, they will be called in the specified order, in the same cases when a single unknown handler would be called (when an unknown action, result, or method are executed), until one of them handles the requested action.
The default class that handles unknown handler stacks is com.opensymphony.xwork2.DefaultUnknownHandlerManager
, a custom implementation of this class can be provided by implementing the interface com.opensymphony.xwork2.UnknownHandlerManager
and setting the property struts.unknownHandlerManager