eclipse 运行JSP代码出现HTTP Status 500错误,如何解决?
HTTPStatus500-typeExceptionreportmessagedescriptionTheserverencounteredaninternalerro...
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that
prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 12
9: <table width="755" height="150%" border="0" align="center" cellpadding="0" cellspacing="0">
10: <tr>
11: <td height="98"><div align="center">
12: <jsp:include page="topOne.jsp"></jsp:include> </div> </td>
13:
14: </tr>
15: <tr>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
org.apache.jasper.JasperException: An exception occurred processing JSP page /topOne.jsp at line 7
4: <%@page import="com.domain.LinkForm" %>
5: <jsp:useBean id="dao" scope="page" class="com.dao.LinkDao"/>
6: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
7: <%List list=dao.selectLink();%>
8: <link href="css/css.css" rel="stylesheet" type="text/css">
9:
10: 展开
type Exception report
message
description The server encountered an internal error () that
prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 12
9: <table width="755" height="150%" border="0" align="center" cellpadding="0" cellspacing="0">
10: <tr>
11: <td height="98"><div align="center">
12: <jsp:include page="topOne.jsp"></jsp:include> </div> </td>
13:
14: </tr>
15: <tr>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
org.apache.jasper.JasperException: An exception occurred processing JSP page /topOne.jsp at line 7
4: <%@page import="com.domain.LinkForm" %>
5: <jsp:useBean id="dao" scope="page" class="com.dao.LinkDao"/>
6: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
7: <%List list=dao.selectLink();%>
8: <link href="css/css.css" rel="stylesheet" type="text/css">
9:
10: 展开
2个回答
展开全部
根据你的报错信息
出错的应该是topOne.jsp页面中的第7行
也就是<%List list=dao.selectLink();%>
里面的dao 可能获取不到 建议如下
<%@page import="com.dao.LinkDao" %>
<%
LinkDao dao=new LinkDao();
List list =dao.selectLink();
%>
将<jsp:useBean id="dao" scope="page" class="com.dao.LinkDao"/>去掉 换成上面的那种
试试看吧 祝你好运
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询