Example usage for javax.servlet.http HttpServletRequest getRequestURI

List of usage examples for javax.servlet.http HttpServletRequest getRequestURI

Introduction

In this page you can find the example usage for javax.servlet.http HttpServletRequest getRequestURI.

Prototype

public String getRequestURI();

Source Link

Document

Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.

Usage

From source file:com.thoughtworks.go.server.web.IgnoreResolver.java

private boolean isDownloadAgentJar(HttpServletRequest request) {
    return StringUtils.equals(request.getRequestURI(), request.getContextPath() + "/admin/agent");
}

From source file:WebApp.Controller.OfficialController.java

@Override
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String requestedUri = request.getRequestURI();
    ModelAndView modelAndView = null;//from  w  w w  .ja v a  2 s .c om

    if (requestedUri.contains(Constants.MAKE_EXAM_COMMITTEE))
        modelAndView = new ModelAndView(Constants.MAKE_EXAM_COMMITTEE);
    else
        modelAndView = new ModelAndView("hello");

    return modelAndView;
}

From source file:com.mothsoft.alexis.web.security.TermsOfServiceFilter.java

private boolean isStaticContent(HttpServletRequest request) {
    final String requestUri = request.getRequestURI();
    return requestUri.startsWith(ALEXIS_CSS_PREFIX) || requestUri.startsWith(ALEXIS_IMAGES_PREFIX)
            || requestUri.startsWith(ALEXIS_JS_PREFIX);
}

From source file:org.focusns.common.web.performance.MonitorFilter.java

private String getRequestDescription(HttpServletRequest request) {
    StringBuilder sb = new StringBuilder(request.getRequestURI());
    if (StringUtils.hasText(request.getQueryString())) {
        sb.append("?").append(request.getQueryString());
    }/*from  w  w w .  j a  va  2 s .com*/
    sb.append(" [").append(request.getMethod()).append("]");
    return sb.toString();
}

From source file:org.mitre.openid.connect.filter.MultiUrlRequestMatcher.java

@Override
public boolean matches(HttpServletRequest request) {
    String uri = request.getRequestURI();
    int pathParamIndex = uri.indexOf(';');

    if (pathParamIndex > 0) {
        // strip everything after the first semi-colon
        uri = uri.substring(0, pathParamIndex);
    }/*from   w  w  w.ja  v  a2 s .  co m*/

    if ("".equals(request.getContextPath())) {
        // if any one of the URLs match, return true
        for (String filterProcessesUrl : filterProcessesUrls) {
            if (uri.endsWith(filterProcessesUrl)) {
                return true;
            }
        }
        return false;
    }

    for (String filterProcessesUrl : filterProcessesUrls) {
        if (uri.endsWith(request.getContextPath() + filterProcessesUrl)) {
            return true;
        }
    }

    return false;
}

From source file:com.surevine.alfresco.audit.listeners.ViewDocumentDetailsAuditEventListener.java

@Override
public boolean isEventFired(HttpServletRequest request) {
    return ((request.getRequestURI().contains(URI_DESIGNATOR)) && request.getParameter("shortQNames") == null);
}

From source file:com.thoughtworks.go.server.web.IgnoreResolver.java

private boolean isGoingToLogin(HttpServletRequest request) {
    return StringUtils.contains(request.getRequestURI(), request.getContextPath() + "/auth/");
}

From source file:com.thoughtworks.go.server.web.IgnoreResolver.java

private boolean isGoingToAbout(HttpServletRequest request) {
    return StringUtils.contains(request.getRequestURI(), request.getContextPath() + "/about");
}

From source file:com.thoughtworks.go.server.web.IgnoreResolver.java

private boolean isGoingToPlugin(HttpServletRequest request) {
    return StringUtils.contains(request.getRequestURI(), request.getContextPath() + "/plugin/interact/");
}

From source file:WebApp.Controller.TeacherController.java

@Override
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String requestedUri = request.getRequestURI();

    ModelAndView modelAndView = null;/*from  w ww. j a va 2s  .co m*/

    if (requestedUri.contains(Constants.INCOURSE_MARK_DISTIBUTION)) {
        modelAndView = new ModelAndView("incourseMarkingScope");
        return modelAndView;
    }

    return modelAndView;
}