今天在做一个SSH整合测验时发现了一个异常(According to TLD or attribute directive in tag file)
2011-03-31 15:19
501 查看
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /WEB-INF/page/employee.jsp(24,3) According to TLD or attribute directive in tag file, attribute items does not accept any expressions
页面上的源码如下:
异常提示,在第24行的时候发生错误,说不接受任何表达式,后来在网上找到一个解决方案,说是版本不支持EL,所以把
改为:
一定要记得加引号!
就输出正常了。
org.apache.jasper.JasperException: /WEB-INF/page/employee.jsp(24,3) According to TLD or attribute directive in tag file, attribute items does not accept any expressions
页面上的源码如下:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib uri="/struts-tags" prefix="s" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>employee</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> </head> <body> ONGL: <s:iterator value="#request.employees"> <s:property value="username"/>,<s:property value="password"/>,<s:property value="gender"/> </s:iterator> <br/> JSTL/EL: <c:forEach items="${employees}" var="employee"> ${employee.username}, ${employee.password}, ${employee.gender}<br/> </c:forEach> </body> </html>
异常提示,在第24行的时候发生错误,说不接受任何表达式,后来在网上找到一个解决方案,说是版本不支持EL,所以把
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
改为:
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
一定要记得加引号!
就输出正常了。
相关文章推荐
- 今天在做一个SSH整合测验时发现了一个异常(According to TLD or attribute directive in tag file)
- 今天在做一个SSH整合测验时发现了一个异常(According to TLD or attribute directive in tag file)
- 今天在做一个测验时发现了一个异常(According to TLD or attribute directive in tag file)
- JSP异常--According to TLD or attribute directive in tag file
- 关于According to TLD or attribute directive in tag file, attribute value does not accept any expressions异常
- According to TLD or attribute directive in tag file异常
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions异常原因及解决方法
- Struts2异常----- According to TLD or attribute directive in tag file, attribute test
- 错误处理-According to TLD or attribute directive in tag file, attribute test does not accept any expres
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- JSP中出现According to TLD or attribute directive in tag file
- JSTL:JSP中出现According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- 使用JSTL tag时出现错误:According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- According to TLD or attribute directive in tag file, attribute items does not accept any expressions
- JSP中出现According to TLD or attribute directive in tag file..
- 错误:According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- According to TLD or attribute directive in tag file, attribute [test] does not accept any expression
- 解决:According to TLD or attribute directive in tag file, attribute value does not accept any express。
- JSP中出现According to TLD or attribute directive in tag file, attribute value does not accept any expre