Format Number Max Integer Digits : Format Number « JSTL « Java Tutorial






<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%@ taglib uri="http://java.sun.com/jstl/core-rt" prefix="c-rt" %><%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<html>
  <head>
    <title>Format Date</title>
  </head>

  <body>
  <fmt:formatNumber type="number" maxIntegerDigits="3" value="123456789.123456789" />
  <br><br>
  <fmt:formatNumber type="number" maxIntegerDigits="3" value="9.123456789" />
  <br><br>
  <fmt:formatNumber type="number" maxIntegerDigits="3" value="89.1" />
  </body>
</html>
  Download:  JSTLFormatNumberMaxIntegerDigits.zip( 1,225 k)








24.20.Format Number
24.20.1.Format Number with default format
24.20.2.Format percent number from form input
24.20.3.Format Number Min Integer Digits
24.20.4.Format Number Min Fraction Digits
24.20.5.Format Number Max Integer Digits
24.20.6.Format Number: Max Fraction Digits
24.20.7.Use JSTL to Format Number From Form
24.20.8.Format Number: For Percent Min Integer Digits
24.20.9.Format Number: For Percent Min Fraction Digits
24.20.10.Format Number: For Percent Max Integer Digits
24.20.11.Format Number for Percent Max Fraction Digits