格式化金额巧用0.00
DecimalFormat df = new DecimalFormat("#,##0.00"); this.print(df.format(money));
@Setter @Getter public class MoneyFormatTaglib extends BodyTagSupport { private double money; public int doEndTag() throws JspException { DecimalFormat df = new DecimalFormat("#,###0.00"); this.print(df.format(money)); return this.EVAL_BODY_INCLUDE; } public int doStartTag() throws JspException { return this.EVAL_PAGE; } }