import java.sql.*;
public class sql{
public static void main(String [] args)throws ClassNotFoundException,SQLException{
try{
//add information to DB
String url="jdbc:odbc:jspTest";
String user="dba";
String password="sql";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection(url,user,password);
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select * from tbUser");
System.out.println("All User in DB!");
while(rs.next()){
System.out.print("UserName:");
System.out.print(rs.getString("Name")+"    Password:");
System.out.println(rs.getString("Password"));
}
//clear, must do it
rs.close();
stmt.close();
con.close();
}catch(Exception ex){
System.out.println(ex.getMessage());
}
}
}
可以正确的运行 
-------------------------------------------------------------------------------------
</head><body>
 This is the Management Page!<br>
<%
 String user,pwd;
 user=request.getParameter("username");
 pwd=request.getParameter("password");
try{
//add information to DB
String url="jdbc:odbc:jspTest";
String user="dba";
String password="sql";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection(url,user,password);
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select * from tbUser");
out.println("All User in DB!");
while(rs.next()){
out.print("UserName:");
out.print(rs.getString("Name")+"    Password:");
out.println(rs.getString("Password"));
}
//clear, must do it
rs.close();
stmt.close();
con.close();
}catch(Exception ex){
out.println(ex.getMessage());
} %>
 username=<%=user%><br>
 password=<%=pwd%><br>
</body>
</html>
在ie中错误``` 
是怎么回事呢```?