List of usage examples for org.springframework.web.util WebUtils FORWARD_CONTEXT_PATH_ATTRIBUTE
String FORWARD_CONTEXT_PATH_ATTRIBUTE
To view the source code for org.springframework.web.util WebUtils FORWARD_CONTEXT_PATH_ATTRIBUTE.
Click Source Link
From source file:org.springframework.web.util.UrlPathHelper.java
/** * Return the context path for the given request, detecting an include request * URL if called within a RequestDispatcher include. * <p>As the value returned by {@code request.getContextPath()} is <i>not</i> * decoded by the servlet container, this method will decode it. * @param request current HTTP request/*from www .jav a2 s . com*/ * @return the context path */ public String getOriginatingContextPath(HttpServletRequest request) { String contextPath = (String) request.getAttribute(WebUtils.FORWARD_CONTEXT_PATH_ATTRIBUTE); if (contextPath == null) { contextPath = request.getContextPath(); } return decodeRequestString(request, contextPath); }