Class SetLocaleSupport
- java.lang.Object
-
- jakarta.servlet.jsp.tagext.TagSupport
-
- org.apache.taglibs.standard.tag.common.fmt.SetLocaleSupport
-
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag,jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.Tag,Serializable
- Direct Known Subclasses:
SetLocaleTag,SetLocaleTag
public abstract class SetLocaleSupport extends jakarta.servlet.jsp.tagext.TagSupportSupport for tag handlers for <setLocale>, the locale setting tag in JSTL 1.0.- Author:
- Jan Luehe
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SetLocaleSupport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intdoEndTag()static LocaleparseLocale(String locale)See parseLocale(String, String) for details.static LocaleparseLocale(String locale, String variant)Parses the given locale string into its language and (optionally) country components, and returns the corresponding java.util.Locale object.voidrelease()voidsetScope(String scope)
-
-
-
Method Detail
-
setScope
public void setScope(String scope)
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspException- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException
-
release
public void release()
- Specified by:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classjakarta.servlet.jsp.tagext.TagSupport
-
parseLocale
public static Locale parseLocale(String locale)
See parseLocale(String, String) for details.
-
parseLocale
public static Locale parseLocale(String locale, String variant)
Parses the given locale string into its language and (optionally) country components, and returns the corresponding java.util.Locale object. If the given locale string is null or empty, the runtime's default locale is returned.- Parameters:
locale- the locale string to parsevariant- the variant- Returns:
- java.util.Locale object corresponding to the given locale string, or the runtime's default locale if the locale string is null or empty
- Throws:
IllegalArgumentException- if the given locale does not have a language component or has an empty country component
-
-