jsp页面上使用了jstl后,出现一下问题。请各位帮忙解决下,谢谢!!!

来源:百度知道 编辑:UC知道 时间:2024/06/05 10:11:07
使用jstl出现此问题,请问:如何解决?谢谢
org.apache.jasper.JasperException: /index.jsp(27,2) According to TLD or attribute directive in tag file, attribute items does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:941)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:696)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.No

没有给标签的items 属性传递正确的值。
items属性一般是传递el的值比如${students}。
students是设置在作用域的一个对象,他应该是一个集合

贴一下代码,好像是你的标签属性里用表达式,但是不支持

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

把原来那段替换下 试试

把代码贴出来看看,不然没法判定的