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

📄 _login__jsp.java

📁 通子的考试系统 本程序版权属于通子 程序功能: 1。考生可以选择科目进行考试 2. 考过科目不再重新登陆考试 2。考题时随机的
💻 JAVA
字号:
/*
 * JSP generated by Resin-3.0.8 (built Tue, 08 Jun 2004 02:25:40 PDT)
 */

package _jsp;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import java.sql.*;

public class _login__jsp extends com.caucho.jsp.JavaPage{
  private boolean _caucho_isDead;

  

  Connection con = null;

  Statement stmt = null;

  ResultSet rs = null;

  ResultSet rsScore=null;

  public void jspInit()

  {

  	try

  	{

  		Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

  		//\u8f7d\u5165\u9a71\u52a8\u7a0b\u5f0f\u7c7b\u522b

  

  		con = DriverManager.getConnection("jdbc:odbc:test");

  		//\u5efa\u7acb\u6570\u636e\u5e93\u8fde\u7ebf

  

  		stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,

  					     ResultSet.CONCUR_READ_ONLY);

  		//\u5efa\u7acbStatement\u53d8\u91cf, \u5e76\u8bbe\u5b9a\u8bb0\u5f55\u6307\u6807\u7c7b\u578b\u4e3a\u53ef\u524d\u5f8c\u79fb\u52a8

  	}

  	catch(Exception ex)

  	{

  		System.out.println(ex.toString());

  	}

  }

  public void jspDestroy()

  {

  	try

  	{

  		stmt.close(); //\u5173\u95edStatement\u53d8\u91cf

  		con.close();  //\u5173\u95edConnection\u53d8\u91cf

  		rs.close(); //\u5173\u95edResultSet\u53d8\u91cf

  		rsScore.close();

  	}

  	catch(Exception ex)

  	{

  		System.out.println(ex.toString());

  	}

  }


  
  public void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response)
    throws java.io.IOException, javax.servlet.ServletException
  {
    javax.servlet.http.HttpSession session = request.getSession(true);
    com.caucho.server.webapp.Application _jsp_application = _caucho_getApplication();
    javax.servlet.ServletContext application = _jsp_application;
    com.caucho.jsp.PageContextImpl pageContext = com.caucho.jsp.QJspFactory.allocatePageContext(this, _jsp_application, request, response, null, session, 8192, true);
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    response.setContentType("text/html;charset=GB2312");
    request.setCharacterEncoding("GB2312");
    try {
      out.write(_jsp_string0, 0, _jsp_string0.length);
      
	
	String Name = request.getParameter("Name");	
	String password="";
	String 	No = "";
	String Lesson="";
	String Msg = "";	
	if (Name != null){
		 No = request.getParameter("No");	
		session.setAttribute("No",No);				
		
		session.setAttribute("Name",Name);
				
		 Lesson  = request.getParameter("Lesson");
		session.setAttribute("Lesson",Lesson);	
			
		 password=request.getParameter("password");
		String SQL = "SELECT * From \u6210\u7ee9\u5355 ";
		SQL = SQL + "Where \u5b66\u53f7=" + "'" + No + "'" +
			" And \u59d3\u540d='" + Name + "'And pw='"+password+"'";		
			rs=stmt.executeQuery(SQL);
		if (!rs.next())
		{
		Msg = "\u4f60\u4e0d\u662f\u5408\u6cd5\u8003\u751f!";
		}
		else
		{		
			if (rs.getInt(Lesson) != -1)
			{
				Msg = "\u4f60\u5df2\u7ecf\u8003\u8fc7\u672c\u79d1\u76ee\u4e86!";
			}
			else
			{
				response.sendRedirect("test.jsp");
			}
		}
	}

      out.write(_jsp_string1, 0, _jsp_string1.length);
      out.print((Name));
      out.write(_jsp_string2, 0, _jsp_string2.length);
      out.print((No));
      out.write(_jsp_string3, 0, _jsp_string3.length);
      out.print((password));
      out.write(_jsp_string4, 0, _jsp_string4.length);
      out.print((Msg));
      out.write(_jsp_string5, 0, _jsp_string5.length);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      com.caucho.jsp.QJspFactory.freePageContext(pageContext);
    }
  }

  private com.caucho.java.LineMap _caucho_line_map;
  private java.util.ArrayList _caucho_depends = new java.util.ArrayList();

  public java.util.ArrayList _caucho_getDependList()
  {
    return _caucho_depends;
  }

  public void _caucho_addDepend(com.caucho.make.PersistentDependency depend)
  {
    super._caucho_addDepend(depend);
    _caucho_depends.add(depend);
  }

  public boolean _caucho_isModified()
  {
    if (_caucho_isDead)
      return true;
    if (com.caucho.util.CauchoSystem.getVersionId() != 1174304630)
      return true;
    for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
      com.caucho.make.Dependency depend;
      depend = (com.caucho.make.Dependency) _caucho_depends.get(i);
      if (depend.isModified())
        return true;
    }
    return false;
  }

  public long _caucho_lastModified()
  {
    return 0;
  }

  public com.caucho.java.LineMap _caucho_getLineMap()
  {
    return _caucho_line_map;
  }

  public void destroy()
  {
      _caucho_isDead = true;
      super.destroy();
  }

  public void init(com.caucho.java.LineMap lineMap,
                   com.caucho.vfs.Path appDir)
    throws javax.servlet.ServletException
  {
    com.caucho.vfs.Path resinHome = com.caucho.util.CauchoSystem.getResinHome();
    com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
    mergePath.addMergePath(appDir);
    mergePath.addMergePath(resinHome);
    com.caucho.loader.DynamicClassLoader loader;
    loader = (com.caucho.loader.DynamicClassLoader) getClass().getClassLoader();
    String resourcePath = loader.getResourcePathSpecificFirst();
    mergePath.addClassPath(resourcePath);
    _caucho_line_map = new com.caucho.java.LineMap("_login__jsp.java", "foo");
    _caucho_line_map.add("/Conn.jsp", 2, 14);
    _caucho_line_map.add("/login.jsp", 4, 70);
    _caucho_line_map.add(64, 109);
    _caucho_line_map.add(65, 111);
    _caucho_line_map.add(66, 113);
    _caucho_line_map.add(70, 115);
    com.caucho.vfs.Depend depend;
    depend = new com.caucho.vfs.Depend(appDir.lookup("login.jsp"), "hi4qxybrg2HkAJp/XymKCA==", false);
    _caucho_depends.add(depend);
    depend = new com.caucho.vfs.Depend(appDir.lookup("Conn.jsp"), "RfAIAIG26G1VcP1cIkfxrA==", false);
    _caucho_depends.add(depend);
  }

  private final static char []_jsp_string5;
  private final static char []_jsp_string1;
  private final static char []_jsp_string0;
  private final static char []_jsp_string3;
  private final static char []_jsp_string2;
  private final static char []_jsp_string4;
  static {
    _jsp_string5 = "</FONT>\r\n</BODY>\r\n</HTML>\r\n".toCharArray();
    _jsp_string1 = "\r\n<HTML>\r\n	<head>\r\n	<title>\u5728\u7ebf\u8003\u8bd5\u7cfb\u7edf</title>\r\n<script language=\"javascript\" >\r\nfunction check(){	\r\n	if(document.form1.No.value!=\"\"&&document.form1.password.value=!\"\"){\r\n	return true;\r\n	}else{\r\n	return false;\r\n	}\r\n	\r\n	}\r\n</script>\r\n	</head>\r\n<BODY  BGCOLOR=#CCCCCC>\r\n	<H1 ALIGN=\"CENTER\">\u5728\u7ebf\u8003\u8bd5\u7cfb\u7edf</H1>\r\n	<HR>\r\n		<FORM ACTION=\"login.jsp\" METHOD=\"POST\" name=\"form1\"  onSubmit=\"return check()\">\r\n			<P>\u8003\u8bd5\u79d1\u76ee\uff1a<SELECT NAME=\"Lesson\" SIZE=\"1\">\r\n				<OPTION VALUE=\"JSP\">JSP</OPTION>\r\n				<OPTION VALUE=\"XML\">XML</OPTION>\r\n			</SELECT></P>\r\n	<P>\u59d3\u540d\uff1a<INPUT TYPE=\"TEXT\" SIZE=\"20\" NAME=\"Name\"  VALUE=\"".toCharArray();
    _jsp_string0 = "\r\n\r\n\r\n\r\n".toCharArray();
    _jsp_string3 = "\"></P>\r\n	<P>\u5bc6\u7801\uff1a<INPUT TYPE=\"password\" SIZE=\"20\" NAME=\"password\" VALUE=\"".toCharArray();
    _jsp_string2 = "\"></P>\r\n	<P>\u5b66\u53f7\uff1a<INPUT TYPE=\"TEXT\" SIZE=\"20\" NAME=\"No\" VALUE=\"".toCharArray();
    _jsp_string4 = "\"></P>\r\n	<P><INPUT TYPE=\"Submit\" NAME=\"Submit\" VALUE=\" \u5f00\u59cb\u8003\u8bd5\"> </P>\r\n	</FORM>\r\n	<HR>\r\n	<FONT Color=\"red\">".toCharArray();
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -