主题:请问如下源代码有什么问题!!急 (另求留言板输出源代码,用于浏览数据库表中已有的留言)
<html>
<body>
<%@ page contentType="text/html;charset=gb2312" language="java" import="java.sql.*"%>
<%
Connection con=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:foxdb","","");
Statement statement=con.createStatement();
ResultSet rs=statement.executeQuery("select * from foxtable");
%>
<table border="1" width="100%" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#CCCCFF" bordercolordark="#FFFFFF">
<tr bgcolor="#FFFFFF">
<td width="15%" height="25" align="center"><i>作者</i></td>
<td width="28%" height="25" align="center"><i>发表时间</i></td>
<td width="22%" height="25" align="center"><i>Email</i></td>
<td width="35%" height="25" align="center"><i>留言内容</i></td>
<%
while(rs.next()){
out.println("<TR><td align=center><font size=2 color=#999999>"+rs.getString("作者")+"</TD>");
out.println("<TD><font size=2color=#999999>"+rs.getString("Email")+"</font></TD>");
out.println("<TD><font size=2 color=#999999>"+rs.getString("留言")+"</font></TD>");
out.println("<TD><font size=2 color=#999999>"+rs.getString("URL")+"</font></TD></TR>");
}
rs.close();
con.close();
}
catch(Exception e)
{
out.println(e.getMessage());
}
%>
</table>
</body>
</html>
<body>
<%@ page contentType="text/html;charset=gb2312" language="java" import="java.sql.*"%>
<%
Connection con=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:foxdb","","");
Statement statement=con.createStatement();
ResultSet rs=statement.executeQuery("select * from foxtable");
%>
<table border="1" width="100%" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#CCCCFF" bordercolordark="#FFFFFF">
<tr bgcolor="#FFFFFF">
<td width="15%" height="25" align="center"><i>作者</i></td>
<td width="28%" height="25" align="center"><i>发表时间</i></td>
<td width="22%" height="25" align="center"><i>Email</i></td>
<td width="35%" height="25" align="center"><i>留言内容</i></td>
<%
while(rs.next()){
out.println("<TR><td align=center><font size=2 color=#999999>"+rs.getString("作者")+"</TD>");
out.println("<TD><font size=2color=#999999>"+rs.getString("Email")+"</font></TD>");
out.println("<TD><font size=2 color=#999999>"+rs.getString("留言")+"</font></TD>");
out.println("<TD><font size=2 color=#999999>"+rs.getString("URL")+"</font></TD></TR>");
}
rs.close();
con.close();
}
catch(Exception e)
{
out.println(e.getMessage());
}
%>
</table>
</body>
</html>