DBtags posted by me is type of following definition. <%@ taglib prefix="sql" uri="http://jakarta.apache.org/taglibs/dbtags" %> (I prefer this old dbtags to standard-taglibs' one.)
I tried to use standard-taglibs' dbtags(ver1.2.5) using following jsp test file on Tomcat9. <%@ page contentType="text/html;charset=UTF-8"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %> <html> <head> <title>All of Producer</title> </head> <body> <sql:setDataSource dataSource="jdbc/kome" var="kome"/> <sql:query var="rs" dataSource="${kome}"> select ProducerName from Producer </sql:query> <c:forEach var="rec" items="${rs}"> <c:out value="${rec.ProducerName}"/> </c:forEach> </body> </html> But, I got error as following. org.apache.jasper.JasperException: An exception occurred processing [/test.jsp] at line [15] 12: <sql:query var="rs" dataSource="${kome}"> 13: select ProducerName from Producer 14: </sql:query> 15: <c:forEach var="rec" items="${rs}"> 16: <c:out value="${rec.ProducerName}"/> 17: </c:forEach> 18: </body> javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items" in <forEach> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:666) org.apache.jsp.test_jsp._jspService(test_jsp.java:168) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) What's wrong? Regards. Kazuaki Miyauchi, Japan --------------------------------------------------------------------- To unsubscribe, e-mail: taglibs-user-unsubscr...@tomcat.apache.org For additional commands, e-mail: taglibs-user-h...@tomcat.apache.org