congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Collectors (java.util.stream)
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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