えむけいのWeb Memo

iPhone、iOSアプリ開発、健康、社会に関するブログです

struts2

CSRF対策のtokenInterceptorサンプル

かなり手こずったのでメモしておく。 これからも使うはず。 <action name="hoge-hoge" class="jp.co.hogehoge.action.HogeHogeAction"> <interceptor-ref name="defaultStack"/> <interceptor-ref name="token"> <param name="excludeMethods">register</param> </interceptor-ref> <result name="invalid.token">/WEB-INF/content/common/Error.jsp</result></interceptor-ref></action>