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

📄 updatecour_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 updatecour_0002ejsp_jsp extends HttpJspBase {

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

    static {
    }
    public updatecour_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="/updatecour.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="/updatecour.jsp";from=(6,0);to=(6,54)]
                course course = null;
                boolean _jspx_specialcourse  = false;
                 synchronized (pageContext) {
                    course= (course)
                    pageContext.getAttribute("course",PageContext.PAGE_SCOPE);
                    if ( course == null ) {
                        _jspx_specialcourse = true;
                        try {
                            course = (course) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "course");
                        } catch (ClassNotFoundException exc) {
                             throw new InstantiationException(exc.getMessage());
                        } catch (Exception exc) {
                             throw new ServletException (" Cannot create bean of class "+"course", exc);
                        }
                        pageContext.setAttribute("course", course, PageContext.PAGE_SCOPE);
                    }
                 } 
                if(_jspx_specialcourse == true) {
            // end
            // begin [file="/updatecour.jsp";from=(6,0);to=(6,54)]
                }
            // end
            // HTML // begin [file="/updatecour.jsp";from=(6,54);to=(9,0)]
                out.write("\r\n<body bgcolor=\"#0099FF\" text=\"#FFFFFF\" link=\"#33FF00\">\r\n<p>\r\n");

            // end
            // begin [file="/updatecour.jsp";from=(9,2);to=(12,0)]
                
                String id="",name="";
                id=request.getParameter("id");
            // end
            // HTML // begin [file="/updatecour.jsp";from=(12,2);to=(15,40)]
                out.write("\r\n<form  method=\"post\" action=\"CourseSvlt\">\r\n  <input type=\"hidden\" name=\"action\" value=\"update\">\r\n  <input type=\"hidden\" name=\"id\" value=\"");

            // end
            // begin [file="/updatecour.jsp";from=(15,43);to=(15,45)]
                out.print(id);
            // end
            // HTML // begin [file="/updatecour.jsp";from=(15,47);to=(48,10)]
                out.write("\">\r\n</p>\r\n<p align=\"center\"><font color=\"#00FF00\" size=\"+3\" face=\"方正舒体\">更新课程</font></p>\r\n<p align=\"center\">&nbsp;</p>\r\n  <table width=\"37%\"  border=\"1\" align=\"center\">\r\n    <tr> \r\n      <td width=\"37%\">课程名</td>\r\n      <td width=\"63%\"><input name=\"name\" type=\"text\" id=\"name\"></td>\r\n    </tr>\r\n    <tr> \r\n      <td>学分</td>\r\n      <td><select name=\"mark\" size=\"1\" id=\"mark\">\r\n          <option value=\"1\">1</option>\r\n          <option value=\"2\">2</option>\r\n          <option value=\"3\">3</option>\r\n          <option value=\"4\">4</option>\r\n          <option value=\"5\">5</option>\r\n        </select></td>\r\n    </tr>\r\n    <tr> \r\n      <td>系别</td>\r\n      <td><select name=\"dep\" size=\"1\" id=\"dep\">\r\n          <option>public</option>\r\n          <option>计算机</option>\r\n          <option>机械系</option>\r\n          <option>艺术系</option>\r\n          <option>数理系</option>\r\n        </select></td>\r\n    </tr>\r\n    <tr> \r\n      <td>预修课</td>\r\n      <td><select name=\"prepare\" size=\"1\" id=\"prepare\">\r\n          <option value=\"0\">无预修课</option>\r\n          ");

            // end
            // begin [file="/updatecour.jsp";from=(48,12);to=(53,0)]
                
                ResultSet rs=course.getPrepares();
                while(rs.next()) {
                name=rs.getString("name");
                id=rs.getString("id");
            // end
            // HTML // begin [file="/updatecour.jsp";from=(53,2);to=(54,25)]
                out.write("\r\n          <option value=\"");

            // end
            // begin [file="/updatecour.jsp";from=(54,28);to=(54,30)]
                out.print(id);
            // end
            // HTML // begin [file="/updatecour.jsp";from=(54,32);to=(54,34)]
                out.write("\">");

            // end
            // begin [file="/updatecour.jsp";from=(54,37);to=(54,41)]
                out.print(name);
            // end
            // HTML // begin [file="/updatecour.jsp";from=(54,43);to=(56,10)]
                out.write("</option>\r\n          \r\n          ");

            // end
            // begin [file="/updatecour.jsp";from=(56,12);to=(58,0)]
                
                }
            // end
            // HTML // begin [file="/updatecour.jsp";from=(58,2);to=(70,0)]
                out.write("\r\n        </select> </td>\r\n    </tr>\r\n  </table>\r\n  <p>&nbsp;</p><p align=\"center\"> \r\n    <input type=\"submit\" name=\"Submit\" value=\"提交\">\r\n  </p>\r\n</form>\r\n<p>&nbsp;</p>\r\n<p><a href=\"getcourse.jsp\">&lt;&lt;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 + -