The JSTL Formatting Tag is used for formatting the numbers, currencies and percentages.
Syntax:
fmt:formatNumber tag attributes:
Attribute | Description | Required |
value | It specify the numeric value to display. | Yes |
type | NUMBER, CURRENCY, PERCENT | No |
pattern | It specify a custom formatting pattern for the output.. | No |
currencyCode | Currency code (for type=”currency”). | No |
currencySymbol | Currency symbol (for type=”currency”). | No |
groupingUsed | It specify whether to group numbers (TRUE or FALSE). | No |
maxIntegerDigits | It specify the maximum number of integer digits to print. | No |
minIntegerDigits | It specify the minimum number of integer digits to print. | No |
maxFractionDigits | It specify the maximum number of fractional digits to print. | No |
minFractionDigits | It specify the minimum number of fractional digits to print. | No |
var | It specify the name of the variable to store the formatted number. | No |
scope | It specify the scope of the variable to store the formatted number | No |
Example:
test.jsp
web.xml
No comments:
Post a Comment