Class Util
- java.lang.Object
-
- org.apache.taglibs.standard.tag.common.core.Util
-
public class Util extends 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 String
getContentTypeAttribute(String input, String name)
Get the value associated with a content-type attribute.static Enumeration
getRequestLocales(HttpServletRequest request)
HttpServletRequest.getLocales() returns the server's default locale if the request did not specify a preferred language.static int
getScope(String scope)
static int
getStyle(String style, String errCode)
-
-
-
Method Detail
-
getScope
public static int getScope(String scope)
-
getStyle
public static int getStyle(String style, String errCode) throws JspException
- Throws:
JspException
-
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.
-
-