要用到foreach这些标签的时候,XML中应该怎么配
错误代码:
org.apache.jasper.JasperException: /foreach.jsp(40,0) Unterminated <c:forEach tag
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:132)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1675)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1002)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1274)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1450)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:197)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:365)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:345)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:342)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
我的XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-
app_3_0.xsd"
version="3.0"
metadata-complete="true">
<servlet>
<servlet-name>Login1</servlet-name>
<servlet-class>example.Chek</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Login1</servlet-name>
<url-pattern>/L1</url-pattern>
</servlet-mapping>
</web-app>
求解决……
<c:forEach var="users" items="$(users)">
------解决方案--------------------不用配置吧吗,我平时用都是直接拷贝jstl。jar和standard.jar放到lib,然后在jsp 里面加上引入头那句话就可以用的了,还有要注意一下,j2ee4和j2ee5引入头不一样的、。
------解决方案--------------------
大哥,应该是<c:forEach var="users" items="${users}"> 吧。