首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java相关 >

jsp cannot be resolved to a type异常

2012-05-28 
jsp cannot be resolved to a type错误%@ page contentTypetext/html charsetGB2312 %%@ page imp

jsp cannot be resolved to a type错误
<%@ 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。。。

热点排行