congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Request.getMessageSource
Code IndexAdd Tabnine to your IDE (free)

How to use
getMessageSource
method
in
leap.web.Request

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

origin: org.leapframework/leap-oauth2-server

public static OAuth2Error oauth2Error(Request request, int status, String error, MessageKey key, String defaultDesc) {
  String desc = defaultDesc;
  if (key != null) {
    String localeDesc = request.getMessageSource().tryGetMessage(key);
    if (localeDesc != null) {
      desc = localeDesc;
    }
  }
  OAuth2Error err = new SimpleOAuth2Error(status, error, desc, key);
  return err;
}
origin: org.leapframework/leap-oauth2

public static OAuth2Error oauth2Error(Request request, int status, String error, MessageKey key, String defaultDesc){
  String desc = defaultDesc;
  if(key != null){
    String localeDesc = request.getMessageSource().tryGetMessage(key);
    if(localeDesc != null){
      desc = localeDesc;
    }
  }
  OAuth2Error err = new SimpleOAuth2Error(status, error, desc,key);
  return err;
}
origin: org.leapframework/leap-websecurity

public UserPrincipal createAnonymous(Request request,Response response,AuthenticationContext context) {
  String name = request.getMessageSource().getMessage("websecurity.anonymous.name");
  if(Strings.isEmpty(name)){
    name = "Anonymous";
  }
  return new Anonymous(name);
}
leap.webRequestgetMessageSource

Popular methods of Request

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

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Collectors (java.util.stream)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Github Copilot 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