123xf
发贴: 4
|
于 2005-11-14 11:17
在编译此文当时出现了类似于空指针的错误,然后对其进行了修改见标注(#),修改后出现了入图错误。请教各位高手错在何处及修改的具体方法!!!谢谢!!!!!!!!!!!!!!!!! <!--查询学生密码 --> <%@ page contentType="text/html;charset=gb2312"%> <%@ page import="java.sql.*"%> <%@ include file="/public/checkvalidadmin.jsp"%>
<jsp:useBean id="conn" scope="page" class="test.ConnSQLServer"/> <HTML> <HEAD> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>学生密码查询</title> <link rel="stylesheet" href="../public/style.css"> </HEAD> <BODY background="../images/zhub.jpg"> <center> <form action="querystudentpwd.jsp" method="post"> 请输入学生的证件号码: <input type="text" name="certid" maxlength="18"><br> <input type="reset" value="清空重写"> <input type="submit" value="查询"> <hr> <% String studentid=""; String password=""; String certid=request.getParameter("certid"); ############################################## # // if(certid==null||certid.equals("")) # # if(certid.equals("")) # # { # # # # } # # /*{certid=""; # # try{} # # catch(Exception e){} # # }*/ # ############################################## { out.println("请输入合法的证件号码,单击查询<br>"); return; } String sql="select certid,password from Test_Studentinfo where"; sql+="certid='"+certid+"'"; ResultSet rs=conn.executeQuery(sql); if(! rs.next()){ out.println("没有符合条件的学生信息<br>"); return; } out.println("<br>学生编号:"+rs.getInt("studentid")+"<br>"); out.println("密码:"+rs.getString("password")); %> </form> </center> </BODY> </HTML>
(缩略图,点击图片链接看原图)
YuLimin edited on 2005-11-14 12:19
|