⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getstudent_0002ejsp_jsp.java

📁 一个完整的学生管理系统
💻 JAVA
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class getStudent_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/getStudent.jsp";from=(6,0);to=(6,56)]
    // end

    static {
    }
    public getStudent_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="/getStudent.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="/getStudent.jsp";from=(6,0);to=(6,56)]
                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
            // begin [file="/getStudent.jsp";from=(6,0);to=(6,56)]
                }
            // end
            // HTML // begin [file="/getStudent.jsp";from=(6,56);to=(9,0)]
                out.write("\r\n<body bgcolor=\"#0099FF\" text=\"#FFFFFF\" link=\"#33FF00\">\r\n<p>\r\n");

            // end
            // begin [file="/getStudent.jsp";from=(9,2);to=(14,0)]
                
                String admin_id = (String)session.getAttribute("id");
                if(admin_id==null){response.sendRedirect("login.jsp");}
                String name="",id="",password="",jiguan="",dep="",sex="",tel="",mail="";
                int mark=0;
            // end
            // HTML // begin [file="/getStudent.jsp";from=(14,2);to=(35,6)]
                out.write("\r\n</p>\r\n<p>&nbsp;</p>\r\n<p align=\"center\"><font color=\"#00FF00\" size=\"+3\" face=\"华文行楷\">所有学生</font></p>\r\n<p><a href=\"addstudent.jsp\"><font size=\"+1\" face=\"华文行楷\">新加学生</font></a></p>\r\n\r\n  <div align=\"center\">\r\n    <table width=\"75%\"  border=\"1\">\r\n      <tr>\r\n        <td>学生号</td>\r\n        <td>姓名</td>\r\n        <td>密码</td>\r\n        <td>籍贯</td>\r\n        <td>系别</td>\r\n        <td>性别</td>\r\n        <td>学分</td>\r\n        <td>电话</td>\r\n        <td><p>E_mail</p></td>\r\n        <td>删除</td>\r\n        <td>更新</td>\r\n      </tr>\r\n      ");

            // end
            // begin [file="/getStudent.jsp";from=(35,8);to=(53,2)]
                
                  ResultSet rs = student.getStudent();
                  while(rs.next())
                  {
                  id=rs.getString("id");
                  name=rs.getString("name");
                  password=rs.getString("password");
                  jiguan=rs.getString("jiguan");
                  dep=rs.getString("department");
                  sex=rs.getString("sex");
                  mark=rs.getInt("mark");
                  tel=rs.getString("tel");
                  if(tel==null || tel.equals(""))
                   tel="没有";
                   mail=rs.getString("e_mail");
                   if(mail==null || mail.equals(""))
                   mail="没有";
                
                  
            // end
            // HTML // begin [file="/getStudent.jsp";from=(53,4);to=(55,12)]
                out.write("\r\n      <tr>\r\n        <td>");

            // end
            // begin [file="/getStudent.jsp";from=(55,15);to=(55,17)]
                out.print(id);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(55,19);to=(56,12)]
                out.write("</td>\r\n        <td>");

            // end
            // begin [file="/getStudent.jsp";from=(56,15);to=(56,19)]
                out.print(name);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(56,21);to=(57,12)]
                out.write("</td>\r\n        <td>");

            // end
            // begin [file="/getStudent.jsp";from=(57,15);to=(57,23)]
                out.print(password);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(57,25);to=(58,12)]
                out.write("</td>\r\n        <td>");

            // end
            // begin [file="/getStudent.jsp";from=(58,15);to=(58,21)]
                out.print(jiguan);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(58,23);to=(59,12)]
                out.write("</td>\r\n        <td>");

            // end
            // begin [file="/getStudent.jsp";from=(59,15);to=(59,18)]
                out.print(dep);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(59,20);to=(60,12)]
                out.write("</td>\r\n        <td>");

            // end
            // begin [file="/getStudent.jsp";from=(60,15);to=(60,18)]
                out.print(sex);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(60,20);to=(61,12)]
                out.write("</td>\r\n        <td>");

            // end
            // begin [file="/getStudent.jsp";from=(61,15);to=(61,19)]
                out.print(mark);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(61,21);to=(62,12)]
                out.write("</td>\r\n        <td>");

            // end
            // begin [file="/getStudent.jsp";from=(62,15);to=(62,18)]
                out.print(tel);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(62,20);to=(63,12)]
                out.write("</td>\r\n        <td>");

            // end
            // begin [file="/getStudent.jsp";from=(63,15);to=(63,19)]
                out.print(mail);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(63,21);to=(64,50)]
                out.write("</td>\r\n        <td><a href=\"StudentSvlt?action=delete&id=");

            // end
            // begin [file="/getStudent.jsp";from=(64,53);to=(64,55)]
                out.print(id);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(64,57);to=(65,38)]
                out.write("\">删除</a></td>\r\n        <td><a href=\"updatestu.jsp?id=");

            // end
            // begin [file="/getStudent.jsp";from=(65,41);to=(65,43)]
                out.print(id);
            // end
            // HTML // begin [file="/getStudent.jsp";from=(65,45);to=(67,6)]
                out.write(" \">更新</a> </td>\r\n      </tr>\r\n      ");

            // end
            // begin [file="/getStudent.jsp";from=(67,8);to=(69,2)]
                
                  }
                  
            // end
            // HTML // begin [file="/getStudent.jsp";from=(69,4);to=(76,0)]
                out.write("\r\n    </table>\r\n  </div>\r\n  <p align=\"center\">&nbsp; </p>\r\n<a href=\"admin.jsp\">&lt;&lt;Back </a>\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 + -