What are JSTL formatting tags in JSP?

JSPJava 8Object Oriented ProgrammingProgramming

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
raja
Published on 22-Mar-2019 10:24:09
Advertisements