I have this code:
我有这个代码:
<fmt:formatNumber type="number"
maxFractionDigits="2"
value="${maxAllowableAmount}" />
I have this warning in Eclipse editor:
我在Eclipse编辑器中有这个警告:
"value" does not support runtime expressions
“value”不支持运行时表达式
I tried to ignore it and run the app, but I have this runtime error:
我试图忽略它并运行应用程序,但我有这个运行时错误:
quote symbol expected
引号符号预期
How am I gonna deal with this?
我该怎么处理这件事?
My data comes from the database and I want to format it on my browser.
我的数据来自数据库,我想在浏览器上格式化它。
4 个解决方案
#1
6
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 1.0版本(甚至是原型)。您需要升级到至少JSTL 1.1,或者如果您的容器支持它(Servlet 2.5或更高版本),请升级到当前最新的JSTL 1.2。
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维基页面中找到JSTL下载链接。不要忘记删除旧的JSTL库(jstl.jar和standard.jar)并修复@taglib声明以包含/ jsp路径。还要确保您的web.xml至少符合Servlet 2.4 for JSTL 1.1或至少Servlet 2.5 for JSTL 1.2。
#2
15
Ensure that you are using the correct @ taglib
directive. Replace:
确保使用正确的@ taglib指令。更换:
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
with:
有:
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
The /jsp
makes the difference.
/ jsp有所不同。
#3
2
You need an RT/EL version of the tag library.
您需要标签库的RT / EL版本。
http://docs.oracle.com/javaee/1.3/tutorial/doc/JSTL4.html#wp67593
http://docs.oracle.com/javaee/1.3/tutorial/doc/JSTL4.html#wp67593
#4
1
That's a bit peculiar. If I understand the taglib javadoc correctly, the type
attribute can be a runtime value.
这有点奇怪。如果我正确理解taglib javadoc,则type属性可以是运行时值。
Perhaps you are using an older version of JSTL that doesn't support RT/EL? Check what namespace is associated with the 'fmt' prefix in your JSP.
也许您使用的是不支持RT / EL的旧版JSTL?检查JSP中与'fmt'前缀关联的名称空间。
#1
6
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 1.0版本(甚至是原型)。您需要升级到至少JSTL 1.1,或者如果您的容器支持它(Servlet 2.5或更高版本),请升级到当前最新的JSTL 1.2。
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维基页面中找到JSTL下载链接。不要忘记删除旧的JSTL库(jstl.jar和standard.jar)并修复@taglib声明以包含/ jsp路径。还要确保您的web.xml至少符合Servlet 2.4 for JSTL 1.1或至少Servlet 2.5 for JSTL 1.2。
#2
15
Ensure that you are using the correct @ taglib
directive. Replace:
确保使用正确的@ taglib指令。更换:
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
with:
有:
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
The /jsp
makes the difference.
/ jsp有所不同。
#3
2
You need an RT/EL version of the tag library.
您需要标签库的RT / EL版本。
http://docs.oracle.com/javaee/1.3/tutorial/doc/JSTL4.html#wp67593
http://docs.oracle.com/javaee/1.3/tutorial/doc/JSTL4.html#wp67593
#4
1
That's a bit peculiar. If I understand the taglib javadoc correctly, the type
attribute can be a runtime value.
这有点奇怪。如果我正确理解taglib javadoc,则type属性可以是运行时值。
Perhaps you are using an older version of JSTL that doesn't support RT/EL? Check what namespace is associated with the 'fmt' prefix in your JSP.
也许您使用的是不支持RT / EL的旧版JSTL?检查JSP中与'fmt'前缀关联的名称空间。