StringBuffer的append方法的问题!求助!
本人初学JAVA,JSP!
=======
问题:
源代码:
<%@page contentType= "text/html;charset=gb2312 "%>
<%@page pageEncoding= "UTF-8 "%>
<%@ page import= "java.sql.* " %>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri= "http://java.sun.com/jsp/jstl/core " prefix= "c "%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN "
"http://www.w3.org/TR/html4/loose.dtd ">
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=UTF-8 ">
<title> JSP Page </title>
</head>
<body>
<%
StringBuffer nameList=new StringBuffer();
Connection con=null;
Statement sql=null;
ResultSet rs=null;
try
{
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver ");
}
catch(
ClassNotFoundException e)
{
out.println( "驱动程序加载错误! ");
}
try
{
con=DriverManager.getConnection( "jdbc:obdc:grade ", " ", " ");
sql=con.createStatement();