01: package org.bpmscript.web;
02:
03: import java.util.Map;
04:
05: import javax.servlet.http.HttpServletRequest;
06: import javax.servlet.http.HttpServletResponse;
07:
08: import org.springframework.web.servlet.ModelAndView;
09: import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
10:
11: public class ServletInterceptor extends HandlerInterceptorAdapter {
12:
13: @SuppressWarnings("unchecked")
14: @Override
15: public void postHandle(HttpServletRequest request,
16: HttpServletResponse response, Object handler,
17: ModelAndView modelAndView) throws Exception {
18: Map model = modelAndView.getModel();
19: model.put("req", request);
20: model.put("res", response);
21: model.put("base", request.getContextPath());
22: model.put("locale", request.getLocale());
23: }
24:
25: }
|