为什么JSTL数字格式值不支持运行时表达式? [英] Why JSTL number format value does not support runtime expressions?

查看:258
本文介绍了为什么JSTL数字格式值不支持运行时表达式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这段代码:

<fmt:formatNumber type="number" 
                  maxFractionDigits="2" 
                  value="${maxAllowableAmount}" />

我在Eclipse编辑器中收到此警告:

I have this warning in Eclipse editor:

value不支持运行时表达式

"value" does not support runtime expressions

我试图忽略它并运行应用程序,但我有这个运行时错误:

I tried to ignore it and run the app, but I have this runtime error:


引用符号预期

quote symbol expected

我将如何处理这个?

我的数据来自数据库,我想在浏览器上格式化它。

My data comes from the database and I want to format it on my browser.

推荐答案

您正在使用史前JSTL 1.0版本(甚至是原型)。您需要升级到至少JSTL 1.1,或者如果您的容器支持它(Servlet 2.5或更高版本),请升级到当前最新的JSTL 1.2。

You're using the prehistoric JSTL 1.0 version (or even a prototype). You need to upgrade to at least JSTL 1.1, or if your container supports it (Servlet 2.5 or newer), upgrade to currently latest JSTL 1.2.

您可以找到JSTL下载我们的 JSTL wiki页面中的链接。不要忘记删除旧的JSTL库( jstl.jar standard.jar )并修复 @taglib 声明包含 / jsp 路径。还要确保声明 web.xml 至少符合JSTL 1.1的Servlet 2.4或JSTL 1.2的Servlet 2.5。

You can find JSTL download links in our JSTL wiki page. Don't forget to remove the old JSTL libraries (jstl.jar and standard.jar) and to fix the @taglib declarations to include the /jsp path. Also ensure that your web.xml is declared conform at least Servlet 2.4 for JSTL 1.1 or as at least Servlet 2.5 for JSTL 1.2.

这篇关于为什么JSTL数字格式值不支持运行时表达式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆