代码如下,错误我不知道如何解决:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Insert title here
<%
Class.forName("com.mysql.jdbc.Driver");
String url="jdbc:mysql://localhost:3306?stu/root/";
Connection conn=DriverManager.getConnection(url);
out.print("success!!!");
Statement stt=conn.createStatement();
ResultSet rst=stt.executeQuery("select * from t_students");
while(rst.next()){
out.print(rst.getString("name"));
}
%>