How to define a global page when requested page or method is not found?

后端 未结 2 2050
执笔经年
执笔经年 2020-12-11 11:40

I know how to fine a global error redirect page in our defined package when exception encountered that just by adding the following configuration in the parent package in

2条回答
  •  时光取名叫无心
    2020-12-11 12:29

    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.

     
    

    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

提交回复
热议问题