struts-config.xmlの設定で例外ハンドラを定義する方法があります。
<global-exceptions> <exception handler="myapp.com.exception.MyCustomExceptionHandler" key="exception" type="java.lang.Exception" /> </global-exceptions>
上記設定の場合はtype属性に指定した"java.lang.Exception"とその派生をキャッチしますが、この設定をNullPointerExceptionへと変えることができます。
例外ハンドラ側ではorg.apache.struts.action.ExceptionHandlerを拡張し、mapping.findForward経由でリダイレクトさせることができます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。