📄 updatestu_0005fconfirm_0002ejsp_jsp.java
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class updatestu_0005fconfirm_0002ejsp_jsp extends HttpJspBase {
// begin [file="/updatestu_confirm.jsp";from=(6,0);to=(6,55)]
// end
static {
}
public updatestu_0005fconfirm_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"errorpage.jsp", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/updatestu_confirm.jsp";from=(0,113);to=(6,0)]
out.write("\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<title>确认更新</title>\r\n</head>\r\n");
// end
// begin [file="/updatestu_confirm.jsp";from=(6,0);to=(6,55)]
student student = null;
boolean _jspx_specialstudent = false;
synchronized (pageContext) {
student= (student)
pageContext.getAttribute("student",PageContext.PAGE_SCOPE);
if ( student == null ) {
_jspx_specialstudent = true;
try {
student = (student) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "student");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"student", exc);
}
pageContext.setAttribute("student", student, PageContext.PAGE_SCOPE);
}
}
if(_jspx_specialstudent == true) {
// end
// HTML // begin [file="/updatestu_confirm.jsp";from=(6,55);to=(7,0)]
out.write("\r\n");
// end
// begin [file="/updatestu_confirm.jsp";from=(7,0);to=(7,46)]
JspRuntimeLibrary.introspect(pageContext.findAttribute("student"), request);
// end
// HTML // begin [file="/updatestu_confirm.jsp";from=(6,55);to=(7,0)]
out.write("\r\n");
// end
// begin [file="/updatestu_confirm.jsp";from=(6,0);to=(6,55)]
}
// end
// HTML // begin [file="/updatestu_confirm.jsp";from=(8,14);to=(11,2)]
out.write("\r\n<body bgcolor=\"#0099FF\" text=\"#FFFFFF\" link=\"#66FF00\">\r\n<p align=\"center\"> \r\n ");
// end
// begin [file="/updatestu_confirm.jsp";from=(11,4);to=(28,0)]
try{
String id=(String )session.getAttribute("id");
student.setId(id);
String a = student.getSex();
String c=student.getName();
String d=student.getJiguan();
String e = student.getDep();
String f=student.getPassword();
if(c==null || c.equals("")) throw new Exception("错误,学生姓名不能为空!");
if(f==null || f.equals("")) throw new Exception("错误,学生密码不能为空!");
out.print(" Id 为"+id+"的学生<br>");
out.print("更改性别为: "+a+"<br>");
out.print("更改姓名为"+c+"<br>");
out.print("更改籍贯为 "+d);
student.updateStudent();
} catch(Exception e){out.print(e.toString());}
// end
// HTML // begin [file="/updatestu_confirm.jsp";from=(28,2);to=(34,0)]
out.write("\r\n</p>\r\n<p> </p>\r\n<p><a href=\"admin.jsp\"><<Back</a></p>\r\n</body>\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -