Codota Logo
Request.getMessageSource
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
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

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now