public abstract class SetLocaleSupport extends TagSupport
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
value |
protected java.lang.String |
variant |
id, pageContext
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
SetLocaleSupport() |
Modifier and Type | Method and Description |
---|---|
int |
doEndTag()
Default processing of the end tag returning EVAL_PAGE.
|
static java.util.Locale |
parseLocale(java.lang.String locale)
See parseLocale(String, String) for details.
|
static java.util.Locale |
parseLocale(java.lang.String locale,
java.lang.String variant)
Parses the given locale string into its language and (optionally)
country components, and returns the corresponding
java.util.Locale object.
|
void |
release()
Release state.
|
void |
setScope(java.lang.String scope) |
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
public void setScope(java.lang.String scope)
public int doEndTag() throws JspException
TagSupport
doEndTag
in interface Tag
doEndTag
in class TagSupport
JspException
- if an error occurs while processing this tagTag.doEndTag()
public void release()
TagSupport
release
in interface Tag
release
in class TagSupport
Tag.release()
public static java.util.Locale parseLocale(java.lang.String locale)
public static java.util.Locale parseLocale(java.lang.String locale, java.lang.String variant)
locale
- the locale string to parsevariant
- the variantjava.lang.IllegalArgumentException
- if the given locale does not have a
language component or has an empty country component