Class SetLocaleSupport
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.apache.taglibs.standard.tag.common.fmt.SetLocaleSupport
- All Implemented Interfaces:
IterationTag,JspTag,Tag,Serializable
- Direct Known Subclasses:
SetLocaleTag,SetLocaleTag
Support for tag handlers for <setLocale>, the locale setting tag in
JSTL 1.0.
- Author:
- Jan Luehe
- See Also:
-
Field Summary
FieldsFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Default processing of the end tag returning EVAL_PAGE.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()Release state.voidMethods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Field Details
-
value
-
variant
-
-
Constructor Details
-
SetLocaleSupport
public SetLocaleSupport()
-
-
Method Details
-
setScope
-
doEndTag
Description copied from class:TagSupportDefault processing of the end tag returning EVAL_PAGE.- Specified by:
doEndTagin interfaceTag- Overrides:
doEndTagin classTagSupport- Returns:
- EVAL_PAGE
- Throws:
JspException- if an error occurs while processing this tag- See Also:
-
release
public void release()Description copied from class:TagSupportRelease state.- Specified by:
releasein interfaceTag- Overrides:
releasein classTagSupport- See Also:
-
parseLocale
See parseLocale(String, String) for details. -
parseLocale
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
-