コンピュータクワガタ

かっぱのかっぱによるコンピュータ関連のサイトです

redirect=trueとActionMessagesExceptionの組み合わせの挙動

@Execute(validator = true, input = "index.jsp", redirect = true)
public String test() {
    if (check) throw new ActionMessagesException("aaa");
    return "index";
}

のようなアクションがあったとき、returnで指定されたページへはredirectします。
また、validatorでエラーがあった時には、redirectしません(https://www.seasar.org/issues/browse/SASTRUTS-90)。
が、ActionMessagesExceptionを発生させた場合には、inputで指定したページへredirectしようとします。
これはちょっと微妙な気がします。