在JSP中使用JavaBeans连接数据库  被引量:13

Using JavaBeans to connect database in JSP

在线阅读下载全文

作  者:李肃义[1] 李洋[2] 

机构地区:[1]吉林大学计算机中心,吉林长春130026 [2]中国人民银行长春支行,吉林长春130021

出  处:《吉林大学学报(信息科学版)》2002年第3期85-88,共4页Journal of Jilin University(Information Science Edition)

摘  要:针对动态网站频繁地从数据库中取得数据、与数据库建立连接时耗费服务器资源与时间的问题 ,给出了在 JSP(Java serverpages)中使用 Java Beans连接数据库的方法。该方法利用 Bean建立数据库连接 ,并将Bean对象存入 session中 ,响应 Http Session Binding Event事件 ,且利用 value Unbound方法 ,在 session对象中止时 ,执行关闭数据库连接对象的善后工作。讨论了将对象分别存入 page、 session、 appliction中的差异 ,证明了在 JSP中使用 Bean既可以简化 JSP网页结构 ,又可以保证系统的安全性和提高系统的执行效率。A method of setting up database connection is given by using JavaBeans in JSP(Java server pages) to solve such problems as wasting server source and long consuming time for the dynamic web site's obtaining data from database frequently. This method uses Bean to set up database connection,saves the Bean object in session ,respond the HttpSessionBindingEvent event, and uses valueUnbound method to close the Bean object of database connection while ending session. The diffrence of the Bean object in page,in session and in application is discussed.The result shows that the use of Bean in JSP can simplify the structure of JSP pages, ensure the security of system,and improve the executive efficiency.

关 键 词:JAVABEANS组件 JAVA数据库连接 JDBC-ODBC桥 组件 数据库 

分 类 号:TP393.09[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象