JSTL <c:forEach> 问题
用循环生成10行10列的表格,测试出错,JSTL的包已导入。求助<%@pagelanguage="java"import="java.util.*"contentType...
用循环生成10行10列的表格,测试出错,JSTL的包已导入。求助
<%@ page language="java" import="java.util.*"
contentType="text/html;charset=utf-8"
pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!-- DOCTYPE HTML PUBLIC "-//W3C//DTD HTML4.01 Transitional//EN" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'Table.jsp' starting page</title>
</head>
<body>
<center>
<h1>循环生成10行10列的表格</h1>
<table border="1">
<c:forEach var="hang" begin="1" end="10" step="1">
<tr>
<c:forEach var="lie" begig="1" end="10" step="1">
<td><c:out value="a"/></td>
</c:forEach>
</tr>
</c:forEach>
</table>
</center>
</body>
</html>
错误为;
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /CH09/Table.jsp(35,8) Attribute begig invalid for tag forEach according to TLD
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
……
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.
Apache Tomcat/6.0.20
2楼的,没收到你发什么给我哦。。。 展开
<%@ page language="java" import="java.util.*"
contentType="text/html;charset=utf-8"
pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!-- DOCTYPE HTML PUBLIC "-//W3C//DTD HTML4.01 Transitional//EN" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'Table.jsp' starting page</title>
</head>
<body>
<center>
<h1>循环生成10行10列的表格</h1>
<table border="1">
<c:forEach var="hang" begin="1" end="10" step="1">
<tr>
<c:forEach var="lie" begig="1" end="10" step="1">
<td><c:out value="a"/></td>
</c:forEach>
</tr>
</c:forEach>
</table>
</center>
</body>
</html>
错误为;
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /CH09/Table.jsp(35,8) Attribute begig invalid for tag forEach according to TLD
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
……
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.
Apache Tomcat/6.0.20
2楼的,没收到你发什么给我哦。。。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询