exam.jsp
资源名称:examasp.rar [点击查看]
上传用户:hjt198082
上传日期:2015-04-16
资源大小:95k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
Java
- <%@page contentType="text/html;charset=GBK"%>
- <%@page import="java.sql.*"%>
- <jsp:useBean id="conn" scope="page" class="test.ConnOracle"/>
- <%@ include file="/public/checkvalidstudent.jsp"%>
- <%!
- ResultSet rs = null; // 执行Sql语句返回的结果集
- String studentid = "";
- String password = "";
- String sql = "";
- int priv = 0;
- %>
- <%
- sql = "select * from test_classinfo";
- try {
- rs = conn.executeQuery( sql );
- }catch(Exception ee) {
- out.println("<center>");
- out.println("访问课程信息出错!请将以下信息告知系统管理员。<br>");
- out.println(ee.toString() + "<br>");
- out.println("<a href=javascript:history.back()>单击这里返回</a>");
- out.println("</center>");
- }
- if(!rs.next()) {
- out.println("数据库中没有课程信息,无法进行考试!");
- return;
- }
- %>
- <HTML>
- <HEAD>
- <title>选择测试科目</title>
- <link rel="stylesheet" href="../public/style.css">
- </HEAD>
- <BODY class="ss">
- <br><br><br><br><br><br><br><br><br>
- <center>
- <form action="exam2.jsp" method="post">
- 请选择对应的班级:
- <select name=classid>
- <%
- do {
- out.println("<option value=" + rs.getString("classid") + ">" + rs.getString("classname") + "</option>");
- }while(rs.next());
- %>
- </select>
- <br><br><br><br><br><br><br><br><br>
- <input type="submit" value="进入考场">
- </form>
- </center>
- </body>
- </html>