What are JSTL formatting tags in JSP?


The JSTL formatting tags are used to format and display text, the date, the time, and numbers for internationalized Websites. Following is the syntax to include Formatting library in your JSP −

<%@ taglib prefix = "fmt" uri = "http://java.sun.com/jsp/jstl/fmt" %>

Following table lists out the Formatting JSTL Tags −

S.No.Tag & Description
1<fmt:formatNumber>: To render numerical value with specific precision or format.
2<fmt:parseNumber>: Parses the string representation of a number, currency, or percentage.
3<fmt:formatDate>: Formats a date and/or time using the supplied styles and pattern.
4<fmt:parseDate>: Parses the string representation of a date and/or time
5<fmt:bundle>: Loads a resource bundle to be used by its tag body.
6<fmt:setLocale>: Stores the given locale in the locale configuration variable.
7<fmt:setBundle>: Loads a resource bundle and stores it in the named scoped variable or the bundle configuration variable.
8<fmt:timeZone>: Specifies the time zone for any time formatting or parsing actions nested in its body.
9<fmt:setTimeZone>: Stores the given time zone in the time zone configuration variable
10<fmt:message>: Displays an internationalized message.
11<fmt:requestEncoding>: Sets the request character encoding

Updated on: 30-Jul-2019

378 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements