org.apache.taglibs.standard.tag.common.core
Class Util

java.lang.Object
  extended by org.apache.taglibs.standard.tag.common.core.Util

public class Util
extends Object

Utilities in support of tag-handler classes.

Author:
Jan Luehe

Constructor Summary
Util()
           
 
Method Summary
static String getContentTypeAttribute(String input, String name)
          Get the value associated with a content-type attribute.
static Enumeration getRequestLocales(javax.servlet.http.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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

getScope

public static int getScope(String scope)

getStyle

public static int getStyle(String style,
                           String errCode)
                    throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.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(javax.servlet.http.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.



Copyright © 2001-2015 The Apache Software Foundation. All Rights Reserved.