Class Util


  • public class Util
    extends java.lang.Object

    Utilities in support of tag-handler classes.

    • Constructor Summary

      Constructors 
      Constructor Description
      Util()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getContentTypeAttribute​(java.lang.String input, java.lang.String name)
      Get the value associated with a content-type attribute.
      static java.util.Enumeration getRequestLocales​(HttpServletRequest request)
      HttpServletRequest.getLocales() returns the server's default locale if the request did not specify a preferred language.
      static int getScope​(java.lang.String scope)  
      static int getStyle​(java.lang.String style, java.lang.String errCode)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • getScope

        public static int getScope​(java.lang.String scope)
      • getStyle

        public static int getStyle​(java.lang.String style,
                                   java.lang.String errCode)
                            throws JspException
        Throws:
        JspException
      • getContentTypeAttribute

        public static java.lang.String getContentTypeAttribute​(java.lang.String input,
                                                               java.lang.String name)
        Get the value associated with a content-type attribute. Syntax defined in RFC 2045, section 5.1.
      • getRequestLocales

        public static java.util.Enumeration getRequestLocales​(HttpServletRequest request)
        HttpServletRequest.getLocales() returns the server's default locale if the request did not specify a preferred language. We do not want this behavior, because it prevents us from using the fallback locale. We therefore need to return an empty Enumeration if no preferred locale has been specified. This way, the logic for the fallback locale will be able to kick in.