JSTL formatting tags are used to format and output text, dates, times, numbers.
Reference: http://www.runoob.com/jsp/jsp-jstl.html
http://www.runoob.com/jsp/jstl-format-formatnumber-tag.html
The syntax for referencing the formatting tag library is as follows:
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
label description
<fmt:formatNumber> | Formats a number with the specified format or precision |
<fmt:parseNumber> | Parse a string representing a number, currency or percentage |
<fmt:formatDate> | Format date and time using the specified style or pattern |
<fmt:parseDate> | Parse a string representing a date or time |
<fmt:bundle> | bind resources |
<fmt:setLocale> | designated area |
<fmt:setBundle> | bind resources |
<fmt:timeZone> | Specify time zone |
<fmt: setTimeZone> | Specify time zone |
<fmt:message> | Display resource profile information |
<fmt:requestEncoding> | Set the character encoding of the request |
eg:
<fmt:formatNumber type="number" pattern="0.00" value="${paralueSum - (paralueSum * 0.95) }" maxFractionDigits="2"/>