📄 index_jsp.java
字号:
package org.apache.jsp.teacher;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import base.db.Conn;
import base.page.Show;
import java.sql.*;
import base.Teacher;
public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
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;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n\r\n\r\n\r\n\r\n\r\n");
base.Teacher tea = null;
synchronized (session) {
tea = (base.Teacher) _jspx_page_context.getAttribute("tea", PageContext.SESSION_SCOPE);
if (tea == null){
tea = new base.Teacher();
_jspx_page_context.setAttribute("tea", tea, PageContext.SESSION_SCOPE);
}
}
out.write("\r\n<html>\r\n<head>\r\n<title> index </title>\r\n\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"></head>\r\n<link href=\"../css/default.css\" rel=\"stylesheet\" type=\"text/css\">\r\n\r\n<body bgcolor=\"#FFFFFF\">\r\n");
String strid=(String)session.getAttribute("id");
ResultSet rs=tea.getTea(strid);
if(rs.next()) {
tea.setId(rs.getString("id"));
tea.setName(rs.getString("name"));
tea.setDepartment(rs.getString("department"));
tea.setPassword(rs.getString("password"));
session.setAttribute("name",tea.getName());
out.write("\r\n\r\n\r\n<table width=\"500\" align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#F5f7f7\" >\r\n <tr align=\"center\" bgcolor=\"#21536A\">\r\n <td height=\"27\" colspan=\"2\">\r\n <div id=\"reg\">个人信息</div></td>\r\n </tr>\r\n <tr height=\"22\">\r\n <td width=\"50%\">\r\n <div align=\"center\">姓名:</div></td>\r\n\t<td width=\"50%\">\r\n <div align=\"center\">");
out.print(tea.getName());
out.write("\r\n </div></td>\r\n </tr>\r\n <tr height=\"22\">\r\n <td>\r\n <div align=\"center\">号码:</div></td>\r\n\t<td>\r\n <div align=\"center\">");
out.print(tea.getId());
out.write("\r\n </div></td>\r\n </tr>\r\n <tr height=\"22\">\r\n <td>\r\n <div align=\"center\">院系:</div></td>\r\n\t<td>\r\n <div align=\"center\">");
out.print(tea.getDepartment());
out.write(" </div>\r\n </td>\r\n </tr>\r\n</table>\r\n");
}else{
Show show=new Show();
out.print(show.errorBox("数据库错误,请重新登录!","错误信息"));
}
out.write("\r\n</body>\r\n</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -