当前位置: 代码迷 >> Java Web开发 >> 小弟初学jsp,调试出现500异常。请大家给支招呀··
  详细解决方案

小弟初学jsp,调试出现500异常。请大家给支招呀··

热度:582   发布时间:2016-04-17 01:15:03.0
小弟初学jsp,调试出现500错误。。请大家给支招呀··
我的配置是 myeclipse 5.5 jdk1.6 Tomcat 5.0 有人说tomcat不支持jdk1.6 不知道是不是。。
源码:
HTML code
<%@ page language="java" import="java.util.*" pageEncoding="GBK"    contentType="text/html; charset=gb2312" %>    <jsp:directive.page import="my.blog.BLL.RunSql" /><jsp:directive.page import="my.blog.info.Info" /><%    String path = request.getContextPath();    String basePath = request.getScheme() + "://"            + request.getServerName() + ":" + request.getServerPort()            + path + "/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>    <head>        <base href="<%=basePath%>">        <title>Mpl博客程序 - Mpl小组</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">-->        <meta http-equiv="Content-Type" content="text/html; charset=gb2312">        <link href="css/style.css" rel="stylesheet" type="text/css">    </head>    <body>        <font color="#333" id="title_div_style">CStrings博客系统</font>    <%        String sql = "select title,[type],createDate,author,click,comment from nr_table";        //list集合保存信息        List list = new ArrayList();        RunSql rs = new RunSql();        list = rs.RunSelect(sql);        //开始输出数据        for (int i = 0; i < list.size(); i++)         {            Info blogInfo = (Info) list.get(i);        %>        <table width="100%" border="0" cellspacing="2" id="wz_div_style">            <tr>                <td colspan="4" id="bt_div_style">                    <%=blogInfo.title%>                </td>            </tr>            <tr>                <td id="lie_div_style">                    类别:                    <%=blogInfo.type%>                </td>                <td>                    发布时间:                    <%=blogInfo.createDate%>                </td>                <td>                    评论:                    <%=blogInfo.comment%>                </td>                <td>                    浏览:                    <%=blogInfo.click%>                </td>            </tr>        </table>        <%        }        %>    </body></html>


下面的错误。。 500错误。。。
HTTP Status 500 - 

--------------------------------------------

type Exception report

message 

description The server encountered an internal error () that prevented it from fulfilling this request.

exception 

javax.servlet.ServletException: my.blog.BLL.RunSql.RunSelect(Ljava/lang/String;[Ljava/lang/String;)Ljava/sql/ResultSet;
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.index_jsp._jspService(index_jsp.java:134)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
  相关解决方案