<%@ page import="java.sql.*"消瞎纤 %>
<%
String s;
s=request.getParameter("id");
int id;
id=Integer.parseInt(s);
out.print(id);
Connection conn;
Statement st;
ResultSet rs;
String driver;
String url;
driver="com.mysql.jdbc.Driver";
url="jdbc:mysql://localhost:3306/bookdb";
try{
Class.forName(driver);
conn=DriverManager.getConnection(url,"root","拿仿"神罩);
st=conn.createStatement();
rs=st.executeQuery("select * from t_student where no="+id);
while(rs.next()){
out.print(rs.getString(2));
}
}catch(Exception e){
out.print(e);
}
%>