我的代码是
<%
String sn=request.getParameter("ver");
Class.forName("com.mysql.jdbc.Driver");
Connection con =DriverManager.getConnection("jdbc:mysql://localhost:3306/publiccloud","root","root");
Statement st=con.createStatement();
ResultSet rs = st.executeQuery("select * from reg where Username='"+sn+"'"); // this is for name