1、大连交通大学信息工程学院毕业设计(论文)任务书题 目 健身中心会员管理系统任务及要求:1.设计(研究)内容和要求任务:1、 调查健身中心会员管理方面当前技术的发展近况,完成实习报告,字数不少于3000,第三周交给指导老师。2、 结合自己实习情况安排进度,填写进度计划表,第二周完成后交给指导老师签字,并严格执行。3、 按照软件工程思想,独立完成系统的设计和程序开发,完成代码估计2000行左右。4、 用JSP、SSH框架等技术实现用户管理及用户权限的设置、系统选项设置分类及分类信息设置等功能5、 程序简洁,算法可行,运行情况良好。要求:1、 每周和指导老师至少见面沟通一次,回报课题进展情况,接受老
2、师询问。2、 接到任务书后,查阅与题目及专业相关的外文资料进行翻译,要求不少于10000个外文字符,译出汉字不得少于3000,于第四周交给指导老师审阅。3、 毕业设计第13周完成毕业论文的装订,并由指导老师评阅。论文要求12000字以上,包括综述、系统总体设计、系统实现、性能分析、结论等。4、 教学第13周通过中软及教研室组织进行软件验收,验收时要提供软件使用说明书。5、 于第13周提出毕业答辩申请并签字。6、 第14 周答辩,要求制作PPT2.原始依据通过大学几年的学习,已经学习了诸如软件工程、数据库原理及应用、数据结构、JSP、CSS、Struts、Hibernate、Spring等多门程
3、序设计语言和网络等基础知识和专业知识,学生有能力而且可以独立完成小中型项目的设计与开发。学校现有设备和环境可以提供给学生实习和上机,而且具有专业老师可以指导学生。3.参考文献 1 张跃平.JSP实用教程M.北京清华大学出版社.2003 2 SunMicrosystems.Inc.Database Application Programming With JavaTechnologyM.20013 Java Servlet & JSP CookbookM.OReilly Press.20044 万峰科技编著.JSP网站开发四酷全书M.电子工业出版社.20055 武卫华.计算机专业英语M.科学出版
4、社.20046 王诚梅.袁然.王艳.JSP案例开发集锦M.电子工业出版社.20057 吴斌.赵有珍等.SQL Server应用与提高M.科学出版社.20028 王利.数据库基础与应用M.北京中央广播电视大学出版社.19979 高阳.数据库技术与应用M.电子工业出版社.200310 Kevin duffey. Vikram goyal.Ted husted JSP站点设计编程指南M.电子工业出版社.200211 汪孝宜.刘中兵.徐佳晶.JSP数据库开发实例精粹M.电子工业出版社.200512 李刚.轻量级J2EE企业应用实战:Struts+Spring+Hibernate整合开发(含光盘).北京
5、:电子工业出版社.2007.413 李刚编著. 整合Struts+Hibernate+Spring应用开发详解.北京:清华大学出版社.2007.11 指导教师签字:教研室主任签字: 年 月 日大连交通大学信息工程学院毕业设计(论文)进度计划与考核表学生姓名张瑜专业班级网络工程 08-1班指导教师赵凌云郭 杨本课题其他人员无题目健身中心会员管理系统日期计划完成内容完成情况指导老师检查签字第1周实习调研,查阅课题相关外文资料第2周了解行业状况、查阅文献资料,阅读资料,撰写调研报告第3周完成10000字符或3000汉字以上的外文翻译资料,准备资料,学习JSP技术第4周进行需求分析第5周进行概要设计第
6、6周进行概要设计, 基本框架完成,提交毕业论文提纲第7周完成后台数据库的设计并编码,完成部分论文第8周完成前台界面的设计并编码,完成部分论文第9周继续编码并进行测试,继续编写毕业设计论文第10周继续进行程序测试,继续编写毕业设计论文第11周整理资料、文档、图表等,修改毕业设计论文第12周完成毕业设计论文,打印,按要求装订第13周软件验收和准备毕业设计答辩第14周毕业设计答辩及成绩评定指导教师签字: 年月日注:“计划完成内容”由学生本人认真填写,其它由指导教师考核时填写。大连交通大学信息工程学院毕业设计(论文)外文翻译学生姓名 张瑜 专业班级 网络工程08-1班 指导教师赵凌云 郭杨 职 称 高
7、工讲师 所在单位 信息科学系计算机教研室 教研室主任 宋丽芳 完成日期 2012 年 4 月 13 日Database connection based on JSP technologyCompared based on the traditional Client / Server model database system, Web database system uses three browser / server architecture (ie web browser / Web server / database server architecture), has great
8、advantages. Web database system into full play the DBMS and efficient data storage and management capabilities to B / S model as a platform, the unified Web client browser to provide users with easy to use, content-rich database services, has been providing Internet and Intranet core services for el
9、ectronic commerce on the Internet to provide technical support. Web database system is a key technology of Web and database connectivity and access optimization. Web database connection technology Common Web database connection technologies: CGI, WebAPI, RAD technology and JDBC technology. First app
10、eared in the CGI technology has been almost all of the Web server support, but there are serious shortcomings, such as slow performance, development difficulties and poor portability. WebAPI speed the emergence of problems to overcome, but the development more difficult. A variety of API are not com
11、patible, use of extremely limited. RAD technology (rapid development of technology) has changed radically in the development of a difficult situation, but it and the specific Web server depends heavily on the lack of versatility. JDBC (Java Database Connectivity) technologys biggest advantage is tha
12、t it for all the database management system provides a standard interface, can provide unified access to multiple relational database can be divided into three parts: JDBC API is one of the main characteristics of simple and easy to grasp. It is mainly composed by the interface rather than the integ
13、rated class, be included in the java.sql and javax.sql two packages. These interfaces provide JDBC driver from the vendor to complete. JDBC driver managers role is to run the JDBC structure, the guidelines provide the most basic function, that is, when a database program called JDBC API, it will cho
14、ose a correct JDBC driver to connect. JDBC Driver JDBC API is the role of making the program when data calls, connect to the database and the corresponding actual treatment. JDBC driver provides JDBC API interface classes. JSP technique Features of JSP technology Java Server Page (JSP) is the use of
15、 Java code dynamically generated Web pages Moban HTML document. JSP running on the server side component, called the JSP container, it transformed into an equivalent JSP Java Servlet. Because of this, Servlet and JSP page is ultimately related. JSP pages have all the advantages of a Servlet, such as
16、 good performance and scalability, providing embedded on the HTTP session support. At the same time JSP page also has its own advantages, such as the need to automatically re-compile and Web development tools and greater compatibility. JSP container automatically based on time stamp of each file man
17、agement JSP page. When a JSP page request is issued, the judge and the first container. JSP file corresponds to the name of the class. If the class does not exist or over. JSP files in the old, and then an equivalent Servlet container to create Java source code and compile it. If the Servlet instanc
18、e is not running, load the Servlet container and create an instance of the class. Finally, the container sends a thread to handle the load of the instance of the current HTTP request. Therefore, the existence of a JSP page, there are three forms, namely, JSP source code, Java source code and the com
19、piled Java classes. JSP elements can be divided into three types: directives, scripting elements (including expression, Script and statements) and action. Among them, the directive is to indicate what the code generated JSP container order; in the expression and Script can be used in nine implicit o
20、bjects; behavior is to create, modify, or high-level JSP using the object element, using strict XML syntax for encoding. Using JSP Web connection to the database to achieve Java using the JDBC database is a comprehensive technical treatment, general way, to achieve connection to the database, perfor
21、m operations such as query and extract data. Many relational database management systems with a JDBC driver. Specific steps are as follows: 1, complete the environmental setting, import java.sql package, the command is as follows: # Import java.sql .* 2, load drive JDBC driver specification structur
22、e based on the drive into JDBC-ODBC bridge, pure Java and pure Java middleware to the database directly to the database types. In this, the use of Java native API with some type of drive, as explicitly create an instance of the drive and use the drive manager up: DriverManager.registerDriver (new or
23、acle.jdbc.driver.OracleDriver (); 3, connect to the database Driver manager keeps a list of registered drivers, call the getConnection () method get Connection object. One getConnection () the parameters are the database server IP address, port number, bank name and account number required for login
24、 and password database, the sample is as follows: Connection conn = DirverManager.getConnection ( Jdbc: oracle: thin: localhost: 1521: demo, username, password); 4, Statement Interface SQL language consists of a relational database created from that and extract the data statements. JDBC provides the
25、 SQL statements used to encapsulate the object-oriented representation of the text, implementation status and results. This indicated called the java.sql.Statement interface.Use pre-compiled SQL-PreparedStatement and CallableStatement to call a stored procedure extends the Statement interface, the t
26、wo sub-functions, the sample is as follows: Statement stmt = conn.createStatement (); 5, to obtain the result set A result set is ordered list of table rows, the use of JDBC in the java.sql.ResultSet interface presentation. The result set from the Statement interface executeQuery () method or some m
27、ethod calls generated metadata, the sample is as follows: ResultSet rs = stmt.executeQuery (sql); Access to efficient use of connection pooling optimization In this instance, the application layer using WebLogic 6.1, the database layer using Oracle8.1.6, Navigate the browser client. Example In this
28、instance, create a connection pool named ConnectionPool. ConnectionPool the basic properties of the following: m_ConnectionPoolSize minimum number of connections the connection pool;m_ConnectionPoolMax maximum number of connections the connection pool;m_ConnectionUseCount a connection the maximum fr
29、equency of use;m_ConnectionTimeout a connection to the longest idle time; m_MaxConnections = -1 at the same time the maximum number of connections; m_timer timer. These attributes define the connection pool with which status values for each valid connection. Self-managed connection pool, in fact, by
30、 periodically on the status of each connection and the number of connections carried out to determine the appropriate action. Here you can define ConnectionPool management needs to complete the basic interface, the concrete below: public class ConnectionPool implements TimerListener public boolean i
31、nitialize () / / initialize the connection pool public void destroy () / / destroy the connection pool public synchronized java.sql.Connection getConnection () / / get a connection public synchronized void close () / / Close a connection private synchronized void removeFromPool () / / to delete a co
32、nnection from the connection pool private synchronized void fillPool () / / maintain the connection pool size public synchronized void TimerEvent () / / timer event handler Through these interfaces, they can already completed the basic management connection pool. In TimeEvent () function to complete
33、 the state inspection of the connection pool, fillPool () when the connection pool for at least the minimum number of connections. Because users want to save the state of each connection, so it requires a database connection object below: class ConnectionObject public java.sql.Connection con; public
34、 boolean inUse; / / if flag is used public long lastAccess; / / recently started using the time public int useCount; / / is the frequency of use Joined ConnectionObject object, operating in the ConnectionPool should only ConnectionObject, and other processes need is ConnectionObject the con attribut
35、es. So here then add as a class, as other processes to obtain and return the connection interface: CLASS Conn GetConnection (); / / removed from the connection pool of an effective connection CloseConnection (); / / return connection, then do not close the connection, but back in the connection pool
36、 DestroyPool (); / / destroy the connection pool JSP technology to build the current use of B / S structure of the more popular Web database system is the way, while using the database connection pool in the efficiency and stability of the system on a way other than using the traditional system is m
37、uch better. Database connection pool is a kind of the whole system more complicated issue of a viable solution. However, in practical applications, JDBC connection of large Web applications is a small part of the database connection pool manager and Web server, JSP engine, and RDBMS engine managemen
38、t strategies are likely to conflict. Users should fully consider the various parts of the system, so as to give full play to its efficiency. 基于JSP技术的数据库连接相对于基于传统的Client/Server模式的数据库系统,Web数据库系统采用三层浏览器/服务器结构(即网络浏览器/Web服务器/数据库服务器结构),具有极大的优势。Web数据库系统充分发挥了DBMS高效的数据存储与管理能力,以B/S模式为平台,将客户端统一为Web浏览器,为用户提供使用简
39、便、内容丰富的数据库服务,已经成为Internet和Intranet提供的核心服务,为Internet上的电子商务提供技术支持。Web数据库系统的关键技术是Web与数据库的连接和访问优化。 Web数据库连接技术 常见的Web数据库连接技术有:CGI技术、WebAPI技术、RAD技术和JDBC技术等。最早出现的CGI技术得到了几乎所有的Web服务器的支持,但是存在着严重的缺陷,例如运行速度慢、开发困难和可移植性差等。WebAPI的出现克服了速度问题,但是开发更加困难。各种不同的API互不兼容,使用范围极其受限。RAD技术(快速开发技术)从根本上该改变了开发困难的现状,但是它和特定的Web服务器的
40、依赖性很强,缺乏通用性。 JDBC(Java Database Connectivity)技术的最大优势是它为所有数据库管理系统提供一种标准接口,可以为多种关系数据库提供统一访问,大致可以分为以下三个部分: JDBC API的主要特点之一是简单且容易掌握。它主要由接口组成而不是集成类,被包含在java.sql和javax.sql两个包中。这些接口由提供JDBC驱动的软件商来完成。 JDBC驱动管理器的作用是在JDBC运行结构上,提供最基础的指引功能,即当一个JDBC API程序进行数据库调用时,它会选择一个正确的JDBC驱动程序进行连接。 JDBC驱动的作用是当JDBC API制作的程序进行数
41、据调用时,实际连接数据库并进行相应的处理。JDBC驱动提供JDBC API的接口类。 JSP技术 JSP技术的特点 Java Server Page(JSP)是使用Java代码动态生成HTML文档的Web页面摸板。JSP运行于服务器端组件,称为JSP容器,它将JSP转化成等价的Java Servlet。正因为如此,Servlet和JSP页面最终是相关的。JSP页面具有了Servlet的所有优点,如良好的性能和扩展性,对HTTP会话提供嵌入式支持等。同时JSP页面还具有自身的优点,如需要时自动重新编译和与Web开发工具具有更大的兼容性。 JSP容器基于每个文件的时间戳自动管理JSP页面。当对一个
42、JSP页面的请求发出后,容器首先判断与.JSP文件对应的类的名字。 如果该类不存在或比.JSP文件的老,然后容器为一个等价的Servlet创建Java源码并编译它。如果Servlet实例并未运行,容器载入该Servlet类并创建一个实例。最后,容器发送一个线程在载入的实例中处理当前的HTTP请求。所以,一个JSP页面有三种存在形式,即JSP源码、Java源码和已编译的Java类。 JSP元素可以分为三种:伪指令、脚本元素(包含表达式、Script和声明)和动作。其中,伪指令是指示JSP容器生成什么代码的命令;在表达式和Script中可以使用9个隐含对象;行为是创建、修改或使用对象的高层JSP元
43、素,使用严格的XML语法编码。 利用JSP实现Web与数据库的连接 Java使用JDBC技术处理数据库是一种综合、通用方式,实现与数据库的连接,执行查询和提取数据等操作。很多关系数据库管理系统都带有JDBC驱动程序。具体步骤如下: 1.完成环境设置,导入java.sql包,命令如下: #import java.sql.* 2.载入驱动器 JDBC规范依据驱动器结构将驱动器划分为JDBC-ODBC桥、纯Java到数据库中间件和纯Java直接到数据库几种类型。在此,采用本地API与部分Java类型驱动器,显式创建一个如下的驱动器实例并用驱动器管理器注册: DriverManager.registe
44、rDriver(new oracle.jdbc.driver.OracleDriver(); 3.连接到数据库 驱动器管理器保留已注册驱动器列表,调用其getConnection()方法得到Connection对象。其中getConnection()的参数分别是数据库服务器的IP地址、端口号、库名和登录数据库所需的账号与密码,示例如下: Connection conn= DirverManager.getConnection( jdbc:oracle:thin:localhost:1521:demo,username,password); 4.语句接口 SQL语言由从一个关系数据库中创建、表示
45、和抽取数据的语句组成。JDBC提供的这些SQL语句的面向对象的表示用以封装其文本、执行状态和结果。这种表示称为java.sql.Statement接口。使用预编译SQL的PreparedStatement和调用存储过程的CallableStatement这两个子接口扩展了Statement的功能,示例如下: Statement stmt=conn.createStatement(); 5.获得结果集 一个结果集是表格行的排序列表,使用JDBC中的java.sql.ResultSet接口表示。结果集由Statement接口的executeQuery()方法或一些元数据方法调用产生,示例如下: R
46、esultSet rs=stmt.executeQuery(sql); 利用连接池优化访问效率 在本实例中,应用层使用WebLogic 6.1,数据库层采用Oracle8.1.6,客户端使用Navigate浏览器。 实例 在本实例中建立一个命名为ConnectionPool的连接池。ConnectionPool的基本属性如下: m_ConnectionPoolSize 连接池中连接数量下限; m_ConnectionPoolMax 连接池中连接数量上限; m_ConnectionUseCount 一个连接的最大使用次数; m_ConnectionTimeout 一个连接的最长空闲时间; m_M
47、axConnections = -1 同一时间的最大连接数; m_timer 定时器。 这些属性定义了连接池与其中的每个连接的有效状态值。 连接池的自我管理,实际上就是通过定时地对每个连接的状态和连接的数量进行判断而进行相应操作。 这里可以定义出ConnectionPool要完成管理所需要的基本接口,具体见下: public class ConnectionPool implements TimerListener public boolean initialize() /连接池初始化 public void destroy() /连接池的销毁 public synchronized java.s
©2010-2024 宁波自信网络信息技术有限公司 版权所有
客服电话:4008-655-100 投诉/维权电话:4009-655-100