Name
<fmt:setLocale>
Synopsis
The <fmt:setLocale>
action sets the locale configuration variable, establishing the
locale for all other JSTL actions that rely on a locale, disabling
the locale lookup based on user preferences.
Syntax
<fmt:setLocale value="locale
" [variant="variant
"] [scope="page|request|session|application"] />
Attributes
Attributename |
Java type |
Dynamic value accepted |
Description |
---|---|---|---|
value |
|
Yes |
The locale. If set as a |
variant |
|
Yes |
A locale variant, see |
scope |
|
No |
The configuration variable scope. |
Example
<fmt:setLocale value="en-US" />
Get JavaServer Pages, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.