Example usage for org.springframework.web.servlet View PATH_VARIABLES

List of usage examples for org.springframework.web.servlet View PATH_VARIABLES

Introduction

In this page you can find the example usage for org.springframework.web.servlet View PATH_VARIABLES.

Prototype

String PATH_VARIABLES

To view the source code for org.springframework.web.servlet View PATH_VARIABLES.

Click Source Link

Document

Name of the HttpServletRequest attribute that contains a Map with path variables.

Usage

From source file:com.excilys.ebi.bank.web.interceptor.AnnotatedMethodHandlerInterceptor.java

@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
        ModelAndView modelAndView) throws Exception {

    if (modelAndView != null && !isRedirect(modelAndView) && handler instanceof HandlerMethod) {
        HandlerMethod handlerMethod = HandlerMethod.class.cast(handler);
        if (shouldIntercept(handlerMethod)) {

            @SuppressWarnings({ "rawtypes", "unchecked" })
            Map<String, ?> pathVariables = (Map) request.getAttribute(View.PATH_VARIABLES);
            postHandleInternal(request, response, handlerMethod, modelAndView, pathVariables);
        }//w w w. j a  v  a 2  s. com
    }
}