1、<fmt:requestEncoding/>设置请求的编码类型
2、<fmt:setLocal/>设置本地
3、<fmt:bundle/>绑定资源文件
4、<fmt:message/>输出资源文件中的对应信息(key对应的value)
也可以传参数:
5、<fmt:formatNumber/>
保留两位小数:
格式数字(45,678.234)
格式百分比(23%)
货币模式:
6、<fmt:formatDate/>格式化日期
<fmt:requestEncoding value="gb2312"/>
2、<fmt:setLocal/>设置本地
<fmt:setLocal value="zh_CN"/>
3、<fmt:bundle/>绑定资源文件
<fmt:bundle basename="xxx"/>
4、<fmt:message/>输出资源文件中的对应信息(key对应的value)
<fmt:message key="xxx"/>
也可以传参数:
<fmt:message key=xxx"/>
<fmt:param value="${abc}"/>
</fmt:message>
5、<fmt:formatNumber/>
保留两位小数:
<fmt:formatNumber value="123.123456789" pattern="0.00"/>
格式数字(45,678.234)
<fmt:formatNumber type="number" value="45678.2345" />
格式百分比(23%)
<fmt:formatNumber type="percent" value="0.2345" />
货币模式:
<fmt:formatNumber tyupe="currency" value="10000.20"/>
6、<fmt:formatDate/>格式化日期
<fmt:formatDate value="<%=new Date() %>" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>