[size=x-small]
引标签需要注意标签版本的问题,jstl标签有1.0和1.1标准,如果引入下面的1.0版本
会报错:[color=darkred]According to TLD or attribute directive in tag file, attribute target does not accept any expressions[/color]
struts也有1.1,1.2之分,
1.1如下
1.2如下
一般,jstl用1.1,struts用1.2。[/size]
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
引标签需要注意标签版本的问题,jstl标签有1.0和1.1标准,如果引入下面的1.0版本
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
当把el表达式放进标签时如
<c:set target="${user}" property="username" value="fuck1" />
会报错:[color=darkred]According to TLD or attribute directive in tag file, attribute target does not accept any expressions[/color]
struts也有1.1,1.2之分,
1.1如下
<%@ taglib prefix="bean" uri="http://jakarta.apache.org/struts/tags-bean" %>
1.2如下
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
一般,jstl用1.1,struts用1.2。[/size]