「Interceptorでセッションを使うには」の版間の差分
提供: tknotebook
(ページの作成:「Category:コンピュータCategory:JavaCategory:Struts2 メインページ>コンピュータの部屋#Java>Struts2 Tips Interceptor内...」) |
(相違点なし)
|
2017年1月15日 (日) 17:34時点における最新版
メインページ>コンピュータの部屋#Java>Struts2 Tips
Interceptor内でセッションを使うには intercept メソッドで以下のようにセッションを取得します。
@Override public String intercept(ActionInvocation invocation) throws Exception { Map<String, Object> session = invocation.getInvocationContext().getSession();