jsp页面获取数据库数据弹出500

HTTP Status 500 – Internal Server Error


Type Exception Report

Message An exception occurred processing [/news.jsp] at line [81]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing [/news.jsp] at line [81]

78:          
79:          <%
80:                ArrayList<Edit>editlist=(ArrayList<Edit>)session.getAttribute("editlist");
81:                 for( Edit edit:editlist)
82:                 {
83:                     %>
84:         


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:613)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:510)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

jsp页面代码如下:

 <form action="Editservlet" method="get" name="postform">
    <table width="871" height="233" border="0" cellspacing="0">
         
         <%
               ArrayList<Edit>editlist=(ArrayList<Edit>)session.getAttribute("editlist");
                for( Edit edit:editlist)
                {
                    %>
        
      <tr>
        <th width="106" height="28" scope="col">新闻编号:</th>
        <th width="28" scope="col"><%=edit.getId() %></th>
        <th width="30" scope="col">&nbsp;</th>
        <th width="95" scope="col">新闻标题:</th>
        <th width="317" scope="col"><%=edit.getTital() %></th>
        <th width="30" scope="col">&nbsp;</th>
        <th width="74" scope="col">作者:</th>
        <th width="175" scope="col"><%=edit.getWriteer() %></th>
      </tr>
      <tr>
        <td height="126"> 新闻内容:</td>
        <td colspan="7"><%=edit.getContent() %></td>
      </tr>
      <tr>
        <td>发布时间:</td>
        <td><%=edit.getRelea() %></td>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
       
      </tr>
     <%
                        }
                     %>
    </table>

servlet页面:

http://img1.mukewang.com/5daeef130001923208550539.jpg


dopost里没有写东西,可以帮忙看一下是哪里错吗?实在找不出来了

swinm
浏览 1126回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP