在使用jstl1.2 javaEE自带的jstl1.2时我用
java 代码
- <c:out value="${hello}">
时出现了错误
错误是org.apache.jasper.JasperException: /jsp/hello.jsp(17,2) According to TLD or attribute directive in tag file, attribute items does not accept any expressions
看不懂 到网上去搜索下说是
JSTL版本问题
JSP2.0已经包含EL,所以JSTL1.2不提供EL,而由容器提供
在看下解决的方法是
在web.xml文件添加如下一个子节点就可以拉
xml 代码
- <jsp-config>
- <jsp-property-group>
- <url-pattern>*.jsp</url-pattern>
- <el-ignored>true</el-ignored>
- </jsp-property-group>
- </jsp-config>
