According to TLD or attribute directive in tag file, attribute value does not accept any expression
2008-07-10 11:30
561 查看
JSTL的问题(According to TLD or attribute directive in tag file, attribute value does not accept any expressions)
环境: win2003 tomcat 5.5 JDK1.6上
jsp代码:
此时执行没有任何问题。
1+2+3 = <c:out value="${1+2+3}" />执行时就会出现:
According to TLD or attribute directive in tag file, attribute value does not accept any expressions
昨天少了一个jsp,所以一直出现问题。
代码
写成
今天再试。发现JSTL1.1可以用。但是用JSTL1.0时,出现问题。
就是把JSTL1.1的库放到/WEB-INF/lib/ 下。
刚开始我是netbeans 5.5.1中的JSTL库拷贝出来发现可以用。后来用jstl1.1.2的库,也是可以用。
总结:
JSTL1.1的库 在JSP2.0(Servlet 2.4)及以后(推荐用JSTL1.1及以上)用:
代码
web.xml
在 Servlet2.3及以前,
代码
比2.4以后版本少了jsp
web.xml
环境: win2003 tomcat 5.5 JDK1.6上
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > </web-app>
jsp代码:
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 1+2+3 = ${1+2+3} <br> 1+2+3 = <c:out value="6" /> <br>
此时执行没有任何问题。
1+2+3 = <c:out value="${1+2+3}" />执行时就会出现:
According to TLD or attribute directive in tag file, attribute value does not accept any expressions
昨天少了一个jsp,所以一直出现问题。
代码
写成
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
今天再试。发现JSTL1.1可以用。但是用JSTL1.0时,出现问题。
就是把JSTL1.1的库放到/WEB-INF/lib/ 下。
刚开始我是netbeans 5.5.1中的JSTL库拷贝出来发现可以用。后来用jstl1.1.2的库,也是可以用。
总结:
JSTL1.1的库 在JSP2.0(Servlet 2.4)及以后(推荐用JSTL1.1及以上)用:
代码
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > </web-app>
在 Servlet2.3及以前,
代码
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
比2.4以后版本少了jsp
web.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> </web-app>
相关文章推荐
- Exception:According to TLD or attribute directive in tag file, attribute value does not accept any expression
- According to TLD or attribute directive in tag file, attribute value does not accept any expression
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions异常原因及解决方法
- JSTL的问题(According to TLD or attribute directive in tag file, attribute value does not accept any expressions)
- According to TLD or attribute directive in tag file, attribute items does not accept any expression
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- According to TLD or attribute directive in tag file, attribute value does not accept any express
- 错误:According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- EL表达式报错: According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- JSP报错(一) According to TLD or attribute directive in tag file, attribute value does not accept any ex
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- According to TLD or attribute directive in tag file, attribute [test] does not accept any expression
- JSTL:JSP中出现According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- 解决:According to TLD or attribute directive in tag file, attribute value does not accept any express。
- 关于According to TLD or attribute directive in tag file, attribute value does not accept any expressio
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions