<% @ page import="com. Alex. DBC. DatabaseConnection" % & gt;
<% @ page import="Java. SQL. *" % & gt;
<% @ page import="Java. Util. ArrayList" % & gt;
<% @ page contentType="text/HTML. Charset=utf-8 "language=" Java "% & gt;
$Title $& lt;/title>
<body>
<%
ArrayList ArrayList=new ArrayList (a);
Try {
The Statement Statement=DatabaseConnection. GetConnection (). CreateStatement ();
String SQL="SELECT * FROM the userinfo";
The ResultSet res=statement. ExecuteQuery (SQL);
System. Out.println (" executing the try block... ");
While (res), next ()) {
System. Out.println (" [" + res. Get string (1) + "] get the from while... ");
ArrayList. Add (res) get string (1));
}
} the catch (Exception e) {
e.printStackTrace();
} the finally {
DatabaseConnection. Close ();
}
For (String s: arrayList) {
Out.println (s);
}
Out.println (arrayList. The size ());
% & gt;