The JSTL Formatting tag is used to format and parse the data that can be data element, date, time or number. This tag library is used in a jsp page. It also provides the support for internationalization.
Syntax – JSTL Formatting Tag
<%@ taglib uri= “http:// java.sun.com/jsp/jstl/fmt” prefix= “fmt” %>
The JSTL Formatting Tags
- <fmt: formatNumber>: The <fmt: formatNumber> tag is used to formatting the number data.
- <fmt: parseNumber>: The <fmt: parseNumber> tag is used the parse the string of number data such as number, currency, or percentage.
- <fmt: formatDate>: The <fmt: formatDate> tag is used to format the date and time.
- <fmt: parseDate>: The <fmt: parseDate> tag allow us to parse the date and time.
- <fmt: bundle>: The <fmt: bundle> tag is used to create a ResourceBundle object in its tag body.
- <fmt: setLocale>: The setLocale is used to change the locale in the locale configuration variable.
- <fmt: setBundle>: The setBundle tag is used to create a ResourceBundle and stores the object into the given variable.
- <fmt: timeZone>: The <fmt: timeZone> tag is used to set the time zone.
- <fmt: setTimeZone>: The <fmt:setTimeZone> tag is used to load the time zone into a specified scope variable.
- <fmt: message>: The <fmt: message> tag maps key to localized message.
- <fmt: requestEncoding>: The <fmt: requestEncoding> tag is used to set the character encoding of the request.
Previous Tutorial : JSTL Core c:url Tag :: Next Tutorial : JSTL fmt:bundle