Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Servlet/JSP/JSF/JavaFX Script  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
reply to postflat modethreaded modego to previous topicgo to next topicgo to back
作者 修改异常之后的错误,出现了类似于空指针的错误
123xf





发贴: 4
于 2005-11-14 11:17 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
在编译此文当时出现了类似于空指针的错误,然后对其进行了修改见标注(#),修改后出现了入图错误。请教各位高手错在何处及修改的具体方法!!!谢谢!!!!!!!!!!!!!!!!!
<!--查询学生密码 -->
<%@ 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


话题树型展开
人气 标题 作者 字数 发贴时间
3011 修改异常之后的错误,出现了类似于空指针的错误 123xf 2682 2005-11-14 11:17
2396 Re:修改异常之后的错误,出现了类似于空指针的错误 YuLimin 529 2005-11-16 12:53
2371 Re:修改异常之后的错误,出现了类似于空指针的错误 123xf 14 2005-11-27 15:05
2330 Re:修改异常之后的错误,出现了类似于空指针的错误 YuLimin 49 2005-11-27 17:21
2349 Re:修改异常之后的错误,出现了类似于空指针的错误 123xf 12 2005-11-28 14:34
2450 Re:修改异常之后的错误,出现了类似于空指针的错误 YuLimin 113 2005-11-28 18:30

reply to postflat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923