本文介绍了JSP中带指数的Double类型的格式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的页面jsp中,我有一个双重属性$ {bean.property},但它显示如下:

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

1.598E7

我怎样才能将其替换为E7并将其替换为0,如15980000

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

推荐答案

使用 formatNumber

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

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

这篇关于JSP中带指数的Double类型的格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 18:18