Example usage for org.apache.shiro.web.util WebUtils getContextPath

List of usage examples for org.apache.shiro.web.util WebUtils getContextPath

Introduction

In this page you can find the example usage for org.apache.shiro.web.util WebUtils getContextPath.

Prototype

public static String getContextPath(HttpServletRequest request) 

Source Link

Document

Return the context path for the given request, detecting an include request URL if called within a RequestDispatcher include.

Usage

From source file:com.axelor.auth.AuthFilter.java

License:Open Source License

private boolean isRootWithoutSlash(ServletRequest request) {
    final HttpServletRequest req = (HttpServletRequest) request;
    final String ctx = WebUtils.getContextPath(req);
    final String uri = WebUtils.getRequestUri(req);
    return ctx != null && uri != null && !uri.endsWith("/") && ctx.length() == uri.length();
}