<%@ page contentType="text/html; charset=GB2312" %> 
<%@ page import="java.sql.*"%>
<html>
<head>
</head>
<body>
<%
class.forName("com.mysql.jdbc.Driver"); String url="jdbc:mysql://localhost:3306/chinatoi?user=host&password=1234567";
Connection conn=DriverManager.getConnection(url);

Statement stmt=conn.createStatement(); String query="select * from temp";
ResultSet rs=stmt.executeQuery(query); while(rs.next())
{
out.println(re.getString(2));
}
%>
</body>
</html>错误代码:
An error occurred at line: 8 in the jsp file: /login.jsp
Syntax error on token "class", invalid Expression
5: </head>
6: <body>
7: <%
8:  class.forName("com.mysql.jdbc.Driver");
9: