• 大小: 4.63MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-29
  • 语言: Java
  • 标签:

资源简介

jsp+servlet+javabean实现的学校教务管理系统 程序说明: (1)系统测试环境: Windows xp sp2 + myEclipse5.5 + Tomcat6.0 + SQLServer2000 + JDK1.5 (2)数据库文件:数据库备份目录下的文件,自己在sqlserver2000数据库中还原即可,还原的数据库名称为school,然后在windows的管理工具里配置数据源,名称是school,指向此数据库,本系统采用的jdbc-odbc方式连接此数据库的。 (3)测试帐号: 系统管理员帐号和密码: admin admin 教务管理员帐号和密码: edu edu 学生帐号和密码: 0319102206 123456 老师帐号和密码: 0319000003 123456 程序使用方法: 打开MyEclipse后,建立一个web工程,名称为school,将对应目录的文件复杂进去再部署到tomcat服务器上就ok了!

资源截图

代码片段和文件信息

package com;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class TestCon {

/**
 * @param args
 * @throws ClassNotFoundException 
 * @throws IllegalAccessException 
 * @throws InstantiationException 
 */
public static void main(String[] args) throws InstantiationException IllegalAccessException ClassNotFoundException {
// TODO Auto-generated method stub
/*由于我的电脑安装sqlserver后没有开放1433端口,故改用odbc方式连接sqlserver数据库*/
//Class.forName(“com.microsoft.jdbc.sqlserver.SQLServerDriver“).newInstance();
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver“).newInstance();
//String url=“jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=school“; 
String url = “jdbc:odbc:school“;
//String user=“sa“; 
//String password=“sa“; 
try {
 //Connection conn= DriverManager.getConnection(urluserpassword);
Connection conn = DriverManager.getConnection(url);
Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE
ResultSet.CONCUR_READ_ONLY);

ResultSet rs = stmt.executeQuery(“select * from administrator“);
while(rs.next()){
System.out.println(rs.getobject(1));
System.out.println(rs.getobject(2));
System.out.println(rs.getobject(3));
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();

}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        832  2009-04-30 23:13  schooljw\school\.classpath

     文件        291  2009-05-01 10:47  schooljw\school\.mymetadata

     文件       1224  2009-05-01 10:47  schooljw\school\.project

     文件        895  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\Beans\CadminBean.java

     文件       9680  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\Beans\CbestPageBean.java

     文件       1510  2007-05-13 14:45  schooljw\school\src\com\sevenEleven\Beans\CchooseTestBean.java

     文件        560  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\Beans\CclassBean.java

     文件        401  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\Beans\Clesson1Bean.java

     文件        392  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\Beans\Clesson2Bean.java

     文件       1527  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\Beans\CstudentBean.java

     文件       1159  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\Beans\CteacherBean.java

     文件        754  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\Beans\CtextTestBean.java

     文件       2045  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\javaBean\admin_test\Cautomakescheme.java

     文件       4020  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\javaBean\admin_test\CgetCurrentTimeFromTimeClassBegin.java

     文件      10319  2007-05-13 19:49  schooljw\school\src\com\sevenEleven\javaBean\admin_test\CmakeTeacherAndCourseTogether.java

     文件        587  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\javaBean\admin_test\CteacherAndLesson1ForClass.java

     文件       1335  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\javaBean\admin_test\CTimeClassUnit.java

     文件       5502  2009-05-01 12:27  schooljw\school\src\com\sevenEleven\javaBean\CcheckUser.java

     文件       2185  2009-05-01 10:31  schooljw\school\src\com\sevenEleven\javaBean\CConnectMSSQL.java

     文件       2680  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\javaBean\CdataFormat.java

     文件       3281  2009-05-01 00:37  schooljw\school\src\com\sevenEleven\javaBean\CDBConnection.java

     文件       3120  2009-05-01 10:34  schooljw\school\src\com\sevenEleven\javaBean\CDBOracle.java

     文件       1754  2007-05-13 09:34  schooljw\school\src\com\sevenEleven\javaBean\CMethod.java

     文件        252  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\javaBean\Count.java

     文件       2141  2007-05-13 18:56  schooljw\school\src\com\sevenEleven\javaBean\CreateTime.java

     文件       3835  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\javaBean\CseparateTime.java

     文件        485  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\javaBean\CTimeAndString.java

     文件      24657  2007-05-13 15:46  schooljw\school\src\com\sevenEleven\javaBean\exam\Cexam.java

     文件       3745  2007-05-12 17:23  schooljw\school\src\com\sevenEleven\javaBean\exam\CoperationOfExam.java

     文件       9515  2007-05-14 19:21  schooljw\school\src\com\sevenEleven\javaBean\exam\CTakeExam.java

............此处省略449个文件信息

评论

共有 条评论