<%@ page contentType="text/html; charset=GB2312" %>
<%@ page import="java.util.*" %>
<html>
<head>
</head>
<body>
<table align="center">
<tr>
<th width=200>会议主题</th><th width=200>会议地点</th><th width=100>主持人</th><th width=100>人数</th><th width=200>时间</th>
</tr>
<%
int meeting_count=0;
Collection meetings=(Collection)request.getAttribute("meetings");
Iterator it=meetings.iterator();
while(it.hasNext())
{
meetingVO meeting=(meetingVO)it.next();
%>
<tr>
<td ><%=meeting.getMeetingTheme() %></td>
<td><%=meeting.getMeetingDestination() %></td>
<td><%=meeting.getChairman() %></td>
<td><%=meeting.getAttendNumber() %></td>
<td><%=meeting.getDate() %></td>
</tr>
<%} %>
</table>
</body>
</html>
错误为
012-5-26 22:29:37 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 19 in the jsp file: /meetingRusult.jsp
meetingVO cannot be resolved to a type
16: Iterator it=meetings.iterator();
17: while(it.hasNext())
18: {
19: meetingVO meeting=(meetingVO)it.next();
20: %>
21: <tr>
22: <td ><%=meeting.getMeetingTheme() %></td>
An error occurred at line: 19 in the jsp file: /meetingRusult.jsp
meetingVO cannot be resolved to a type
16: Iterator it=meetings.iterator();
17: while(it.hasNext())
18: {
19: meetingVO meeting=(meetingVO)it.next();
20: %>
21: <tr>
22: <td ><%=meeting.getMeetingTheme() %></td>
------解决方案--------------------------------------------------------
在jsp里也要导入import。。。