jsp中如何判断el表达式中的BigDecimal==0

比较蠢一点的做法:

<c:if test="${not ((someBigDecimal < 0) or (someBigDecimal > 0))}">

 

(在JSP2.2里面)好点的做法:

 

${someBigDecimal.unscaledValue() == 0}

 

使用fn函数的做法:

${fn:isZero(someBigDecimal)}

 

 

posted @ 2013-08-13 17:08  air_fans  阅读(2064)  评论(0编辑  收藏  举报