Tabnine Logo
Request.getContextPath
Code IndexAdd Tabnine to your IDE (free)

How to use
getContextPath
method
in
leap.web.Request

Best Java code snippets using leap.web.Request.getContextPath (Showing top 4 results out of 315)

origin: org.leapframework/leap-webapi

@Override
public String getContextPath() {
  return request.getContextPath();
}
origin: org.leapframework/leap-oauth2-webapp

@Override
public String resolveUserAgentForwarded(Request request) {
  if(isProxyRequest(request)){
    String host = request.getHeader(X_FORWARDED_HOST);
    if(Strings.isNotEmpty(host)){
      String protocol = resolveProtocol(request);
      if(Strings.isEmpty(protocol)){
        protocol = "http";
      }
      protocol += "://";
      return protocol + host + request.getContextPath();
    }else{
      return host + request.getContextPath();
    }
  }else{
    throw new IllegalStateException("this request is not a proxied request");
  }
}
origin: org.leapframework/leap-oauth2

@Override
public String resolveUserAgentForwarded(Request request) {
  if(isProxyRequest(request)){
    String host = request.getHeader(X_FORWARDED_HOST);
    if(Strings.isNotEmpty(host)){
      String protocol = resolveProtocol(request);
      if(Strings.isEmpty(protocol)){
        protocol = "http";
      }
      protocol += "://";
      return protocol + host + request.getContextPath();
    }else{
      return host + request.getContextPath();
    }
  }else{
    throw new IllegalStateException("this request is not a proxied request");
  }
}
origin: org.leapframework/leap-websecurity

  protected String getReturnUrl(LogoutContext context, Request request){
    String returnUrl = context.getReturnUrl() ;
    
    if(null == returnUrl){
      returnUrl = request.getParameter(context.getSecurityConfig().getReturnUrlParameterName());
    }
    
    if(Strings.isEmpty(returnUrl)){
      returnUrl = context.getSecurityConfig().getLogoutSuccessUrl();
    }
    
    if(Strings.isEmpty(returnUrl)){
      returnUrl = Strings.isEmpty(request.getContextPath()) ? "/" : request.getContextPath();
    }
    
    return returnUrl;
  }
}
leap.webRequestgetContextPath

Popular methods of Request

  • getHeader
  • getParameter
  • getAttribute
  • getPath
  • getServletRequest
  • setAttribute
  • forwardToView
  • getMessageSource
  • getMethod
  • getSession
  • getUri
  • getValidation
  • getUri,
  • getValidation,
  • tryGetCurrent,
  • getCharacterEncoding,
  • getContextUrl,
  • getLocale,
  • getParameters,
  • getQueryString,
  • getUriWithQueryString

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now