最基本的问题呀rs=stmt.executeQuery("select * form mytable where id='myid' pass='mypass'");
<%if(rs==null)response.sendRedirect("reg.htm");%>