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

📄 choose_student.jsp

📁 这是一个用Struts+Hibernate+Tomcat5.5.9实现的一个“课程管理系统”
💻 JSP
字号:
<%@page contentType="text/html; charset=gb2312" language="java"  errorPage="errorpage.jsp"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Iterator"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="hibernate.HibernateUtil"%>
<%@ page import="hibernate.Classes"%>
<%@ page import="hibernate.Teacher"%>
<%@ page import="hibernate.Course"%>
<%@ page import="hibernate.Choice"%>
<html><!-- InstanceBegin template="/Templates/teacher.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!-- InstanceBeginEditable name="doctitle" -->
<title>挑选您的学生</title>
<!-- InstanceEndEditable --><link rel="stylesheet" href="2col_leftNav.css" type="text/css">
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
<!-- InstanceEndEditable -->
</head>
<!-- The structure of this file is exactly the same as 2col_rightNav.html;
     the only difference between the two is the stylesheet they use -->
<body>
<%
    String tea_id=null;
    tea_id=(String)session.getAttribute("username");
    if(tea_id==null){
      response.sendRedirect("index.jsp");
    }
%>
<div id="masthead">
  <h1 id="siteName">&nbsp;</h1>
  <div id="globalNav">
    <a href="#">global link</a> | <a href="#">global link</a> | <a href="#">global
    link</a> | <a href="#">global link</a> | <a href="#">global link</a> | <a href="#">global
    link</a> | <a href="#">global link</a>
  </div>
</div>
<!-- end masthead -->
<div id="content">
  <div class="feature"><!-- InstanceBeginEditable name="EditRegion1" -->
   <h3>Feature Title </h3>
    <p>
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec molestie.
    Sed aliquam sem ut arcu. Phasellus sollicitudin. Vestibulum condimentum facilisis
    nulla. In hac habitasse platea dictumst. Nulla nonummy. Cras quis libero.
    Cras venenatis. Aliquam posuere lobortis pede. Nullam fringilla urna id leo.
    Praesent aliquet pretium erat. Praesent non odio. Pellentesque a magna a
    mauris vulputate lacinia. Aenean viverra. Class aptent taciti sociosqu ad
    litora torquent per conubia nostra, per inceptos hymenaeos. Aliquam lacus.
    Mauris magna eros, semper a, tempor et, rutrum et, tortor.
</p>
     <table width="80%" border="1" align="center">
      <tr>
        <td width="56"><span class="style2">课程号</span></td>
        <td width="49"><span class="style2">课程名</span></td>
        <td width="49"><span class="style2">学分</span></td>
        <td width="48"><span class="style2">预修课</span></td>
        <td width="56"><span class="style2">所在系</span></td>
        <td width="59"><span class="style2">班级号</span></td>
        <td width="59"><span class="style2">学生人数</span></td>
        <td width="55"><span class="style2">教室号</span></td>
        <td width="74"><span class="style2">上课时间</span></td>
        <td width="47"><span class="style2">接受</span></td>
      </tr>
      <%        
		String class_name0 = "", course_time0 = "", teacher_username0 = "";
		String course_name0 = "", prepare0 = "", develop0 = "";


		long id0, course_ID0;
		int course_number0, classroom0, mark0,number0;

		Integer identifier0 = null;

		//ArrayList list = new ArrayList();
		
		//int i = 0;

		List result_choice = HibernateUtil.getChoiceFromTeacherID(username);

		Iterator it_choice = result_choice.iterator();

		while (it_choice.hasNext()) {

			Choice choice = (Choice) it_choice.next();

			course_number0 = (choice.getCourse_number()).intValue();
			course_name0 = choice.getCourse_name();
			mark0 = (choice.getMark()).intValue();
			prepare0 = choice.getPrepare();
			develop0 = choice.getDevelop();
			class_name0 = choice.getClass_name();
			number0 = (choice.getNumber()).intValue();
			classroom0 = (choice.getCourse_ID()).intValue();
			course_time0 = choice.getCourse_time();
			teacher_username0 = choice.getTeacher_username();
			course_ID0=(choice.getCourse_ID()).longValue();//

			//identifier0 = choice.getIdentifier();
			
			//System.out.println("identifier0的值是:"+identifier0);

			//list.add(i++, identifier0);
	%>
      <tr>
        <td><span class="style2"><%=course_number0%></span></td>
        <td><span class="style2"><%=course_name0%></span></td>
        <td><span class="style2"><%=mark0%></span></td>
        <td><span class="style2"><%=prepare0%></span></td>
        <td><span class="style2"><%=develop0%></span></td>
        <td><span class="style2"><%=class_name0%></span></td>
        <td><span class="style2"><%=number0%></span></td>
        <td><span class="style2"><%=classroom0%></span></td>
        <td><span class="style2"><%=course_time0%></span></td>
        <td><span class="style2"><%=teacher_username0%></span></td>
      </tr>
      <%}%>
    </table>
    <p>&nbsp;</p>
  <!-- InstanceEndEditable -->
  </div>
</div>
<!--end content -->
<div id="navBar">
  <div id="search">
    <form action="#">
      <label>search</label>
      <input name="searchFor" type="text" size="10">
      <input name="goButton" type="submit" value="go">
    </form>
  </div>
  <div id="sectionLinks">
    <ul>
      <li><a href="display_student.jsp">我的学生</a></li>
      <li><a href="public.jsp">公布成绩</a></li>
      <li><a href="logoff.do">退出</a></li>
    </ul>
  </div>
  <div id="headlines"></div>
</div>
<!--end navbar -->
<div id="siteInfo">
  <div align="center"><a href="#">About Us</a> | <a href="#">Site
    Map</a> | <a href="#">Privacy Policy</a> | <a href="#">Contact Us</a> | &copy;2005
    By Luo </div>
</div>
<br>
</body>
<!-- InstanceEnd --></html>

⌨️ 快捷键说明

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