According to TLD or attribute directive in tag file, attribute items does not accept any expressions

直接分析缘由:servlet版本(web.xml中定义的版本号)和jstl版本不一致。java

web.xml:web

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    id="WebApp_ID" version="3.0">app

 

建议:jsp

servlet2.0以上版本时最好搭配jstl1.1以上版本。spa

此外:code

jsp页面标签必须这样写(相比较老版本的jstl,连接中多了一个/jsp):xml

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>get

 

给出jstl各版本下载连接:servlet

http://grepcode.com/search/?start=0&query=jstl&entity=projectit

相关文章
相关标签/搜索