You should define your unknown handler in the struts.xml
. Unknown handlers are called by the framework, when an unknown action, result, or method are executed.
<bean type="com.opensymphony.xwork2.UnknownHandler" name="handler" class="com.package.SomeUnknownHandler"/>
The class should implement UknownHandler
interface to handle the cases:
- when an action configuration is unknown
- when a result cannot be found for an action and result code
- when an action method cannot be found