*/
@Override
public void postHandle(HttpServletRequest request,
- HttpServletResponse response, Object handler,
- ModelAndView modelAndView) throws Exception {
- modelAndView.addObject("acc", this.accountService.getCurrentAccount());
- modelAndView.addObject("loginurl", Sht.loginUrl(request));
- modelAndView.addObject("logouturl", Sht.logoutUrl(request));
+ HttpServletResponse response, Object handler, ModelAndView mav)
+ throws Exception {
+ // リダイレクトする場合は不要
+ if (!mav.getViewName().startsWith("redirect:")) {
+ mav.addObject("acc", this.accountService.getCurrentAccount());
+ mav.addObject("loginurl", Sht.loginUrl(request));
+ mav.addObject("logouturl", Sht.logoutUrl(request));
+ }
}
}