Wrong format of Double type with exponential in JSP

China☆狼群 提交于 2019-12-23 05:35:28

问题


in my page jsp I have a double property ${ bean.property } but it display like this :

1.598E7

how can I make it to with out E7 and replace it with 0 like 15980000


回答1:


use formatNumber

<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<fmt:formatNumber type="number" maxFractionDigits="5" value="${bean.property}" />


来源:https://stackoverflow.com/questions/28568117/wrong-format-of-double-type-with-exponential-in-jsp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!