【JSP开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了JSP开源代码-updateStudent.jsp的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.
sql.*" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题
文档</title>
</head>
<jsp:useBean id="update" scope="page" class="kjgl.update" />
<jsp:setProperty name="update" property="*"/>
</jsp:useBean>
<body bgcolor="#0099FF" text="#FFFFFF" link="#00FF00">
<%
try {
String s = request.getParameter("password");
if(s==null || s.equals("")) throw new Exception("错误,密码不能为空!!");
String stu_id = (String)session.getAttribute("id");
if(stu_id==null){response.sendRedirect("login.jsp");}
update.setStu_id(stu_id);
update.update();
String d= update.getStu_id();
out.print("学生号: "+d+"<br>");
String a = update.getPass
word();
out.print("您的新密码: "+a+"<br>");
String b= update.getTel();
out.print("您的电话: "+b+"<br>");
String c= update.getE_mail();
out.print("E_mail: "+c+"<br>");
%>
<p><a href="student.jsp"><<您已经更新成功,请返回</a>
<p>
<%
}catch (Exception e){out.print(e.toString());}
%>
</body>
</html>