<% @ page import = "java.sql. *"%> <% @ Page ContentType = "text / html; charset = GB2312"%>
/ * Provides a method of identifying a database that allows the corresponding driver to identify the database and establish it with it. JDBC:
// Class.Forname Loaded Driver Connection Con = DriverManager.getConnection (URL);
// establish a connection with DBMS with the appropriate driver class
Statement Stmt = con.createstatement ();
// Used to send a simple SQL statement
String SQL = "SELECT * from psy_content";
ResultSet RS = Stmt.executeQuery (SQL);
While (rs.next ()) {
Out.println (Rs.getstring ("psy_title") "
");
}
%>
Body>
Html>
signature:
Only with intense life can make yourself grow, let yourself adapt to society!