Class Util


  • public class Util
    extends Object

    Utilities in support of tag-handler classes.

    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • getScope

        public static int getScope​(String scope)
      • getContentTypeAttribute

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

        public static 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.