<c:forEach items="${result}" var="u" varStatus="status">
<tr>
<td><label>${u.username}</label></td>
<td><label>${u.employee.empname}</label></td>
<td><label><formate:displayInteger2Date value=${u.employee.birthday} pattern='yyyy-MM-dd'/></label></td>
<td><label>${u.registerdate}</label></td>
<td><label>${u.stopdate}</label></td>
</tr>
</c:forEach>
错误信息:
Messages: ?/web/home.jsp(36,55) quote symbol expected
File: org/apache/jasper/compiler/DefaultErrorHandler.java
Line number: 40
<formate:displayInteger2Date value='${u.employee.birthday}' pattern='yyyy-MM-dd'/>
加上‘’,也报错
Messages: ?/web/home.jsp(36,19) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
File: org/apache/jasper/compiler/DefaultErrorHandler.java
Line number: 40
求解!
------解决方案--------------------
value属性如果想使用el表达式,需要在自定义标签定义的地方,给value属性增加一个属性:
<rtexprvalue>true</rtexprvalue>