1: jstl相关配置 第一种方法) 在web/inf下面加入jstl*.jar,standard*.jar两个jar文件 第二种方法) 在web/inf下面加入相关tld文件,然后在web.xml中加入
http://java.sun.com/jstl/core
/WEB-INF/c.tld
http://java.sun.com/jstl/fmt
/WEB-INF/fmt.tld
http://java.sun.com/jstl/sql
/WEB-INF/sql.tld
http://java.sun.com/jstl/x
/WEB-INF/x.tld
2: jstl使用 在jsp页面中引入相关的tld文件,例 <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" prefix="sql" %> <%@page isELIgnored="false"%> 3: jstl中el表达式无法识别的解决办法 在jsp页面中使用了el表达式但却无法识别,页面会将表达式原封不动的显示出来还是${...}的样子。 只要在jsp页面加入下面这句就可以解决了。 <%@page isELIgnored="false"%> 摘自 http://blog.csdn.net/zskcy/archive/2008/02/13/2090263.aspx 4: 错误“According to TLD or attribute directive in tag file, attribute items does not accept any expressions”的解决办法 出现这种问题的原因是引用了core tag中过时的uri 过时的uri: <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> 正确的uri: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
jstl使用
最新推荐文章于 2024-07-04 08:43:20 发布