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.AuthorizationInterceptor.java

private boolean isEditingConfigurationRequest(HttpServletRequest request) {
    return request.getRequestURI().contains("/admin/restful/configuration");
}

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

/**
 * {@inheritDoc}/* ww  w. j  a  v  a2 s  .  co  m*/
 */
public boolean isEventFired(final HttpServletRequest request) {
    return request.getRequestURI().contains(this.getURIDesignator());
}

From source file:info.magnolia.module.admininterface.AdminTreeMVCServlet.java

/**
 * @see info.magnolia.cms.servlets.MVCServlet#getHandler(javax.servlet.http.HttpServletRequest)
 */// w w  w . ja  v  a  2  s  .  co m
protected MVCServletHandler getHandler(HttpServletRequest request, HttpServletResponse response) {
    String handlerName = request.getRequestURI();
    handlerName = StringUtils.replaceOnce(StringUtils.substringAfterLast(handlerName, "/trees/"), ".html",
            StringUtils.EMPTY);

    return TreeHandlerManager.getInstance().getTreeHandler(handlerName, request, response);
}

From source file:baggage.hypertoolkit.RouteFinder.java

public Supplier<RequestHandler> resolve(HttpServletRequest request) {
    String name = request.getRequestURI().replaceAll("^" + request.getServletPath() + "/", "").replaceAll("^/",
            "");/*  w w w .ja  va  2s . c o  m*/

    for (String extension : StaticFileHandler.MIME_TYPES.keySet()) {
        if (name.endsWith(extension)) {
            return () -> new StaticFileHandler(webDir);
        }
    }

    if (StringUtils.isEmpty(name)) {
        return defaultHandler;
    }
    if (map.containsKey(name)) {
        return map.get(name);
    } else {
        Log.debug(this, "404: " + name);
        return () -> new FourOhFour();
    }
}

From source file:org.shredzone.cilla.view.interceptor.GenericViewInterceptor.java

@Override
public String onRendering(String template, HttpServletRequest req, HttpServletResponse resp) {
    req.setAttribute("selfUri", req.getRequestURI());
    resp.setHeader("Vary", "Accept-Language");
    return null;/*from   w  ww. jav a 2  s.com*/
}

From source file:com.orange.api.atmosdav.AtmosDavServlet.java

/**
 *
 * This is just a wrapper so that we place in a central point the
 * retrieval of the HREF from the http request.
 *
 * @param req/*from  w ww.j a va2s . c o m*/
 * @return
 */
private static final String getPathFromReq(HttpServletRequest req) {
    return req.getRequestURI();
}

From source file:com.ms.app.web.commons.pagecache.DefaultPageCache.java

public String calculateKey(HttpServletRequest request) {
    return request.getRequestURI();
}

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

@Override
public boolean isEventFired(final HttpServletRequest request) {
    return request.getRequestURI().contains(URI_DESIGNATOR) && request.getRequestURI().contains("replies");
}

From source file:io.dfox.junit.http.example.NoteServlet.java

private String getNoteName(final HttpServletRequest request) {
    return request.getRequestURI().substring(request.getContextPath().length() + 1);
}

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

private boolean isGoingToServerInfo(HttpServletRequest request) {
    return StringUtils.equals(request.getRequestURI(), request.getContextPath() + "/api/server.xml");
}