日期:2014-05-18  浏览次数:20783 次

小弟初学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.doHandlePageExcep