建了个没带Form、Action的JSP的页面,想迭代出数据库里某表某字段的全部记录!(在线等)
jsp里的代码:
<%@ page language= "java " pageEncoding= "GBK "%>
<%@ taglib uri= "http://struts.apache.org/tags-bean " prefix= "bean " %>
<%@ taglib uri= "http://struts.apache.org/tags-html " prefix= "html " %>
<%@ taglib uri= "http://struts.apache.org/tags-logic " prefix= "logic " %>
<%@ taglib uri= "http://struts.apache.org/tags-tiles " prefix= "tiles " %>
<jsp:useBean id= "web_menuVO " class= "com.kzon.DAO.web_menuDao " scope= "page "> </jsp:useBean>
<bean:define id= "vo " name= "web_menuVO " property= "firstmenu_name "> </bean:define>
<html:html lang= "true ">
<head>
<html:base />
<title> menu.jsp </title>
<meta http-equiv= "pragma " content= "no-cache ">
<meta http-equiv= "cache-control " content= "no-cache ">
<meta http-equiv= "expires " content= "0 ">
<meta http-equiv= "keywords " content= "keyword1,keyword2,keyword3 ">
<meta http-equiv= "description " content= "This is my page ">
<!--
<link rel= "stylesheet " type= "text/css " href= "styles.css ">
-->
</head>
<body>
<logic:iterate id= "vo ">
<table>
<tr>
<th> 目录名 </th>
</tr>
<tr>
<td>
<bean:write name= "vo " property= "menu_name "/>
</td>
</tr>
</table>
</logic:iterate>
</body>
</html:html>
启动服务后报:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception thrown by getter for property firstmenu_name of bean web_menuVO
org.apache.jasper.servlet.JspServletWrapper.handle
JspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.s