欢迎来到三一文库! | 帮助中心 三一文库31doc.com 一个上传文档投稿赚钱的网站
三一文库
全部分类
  • 研究报告>
  • 工作总结>
  • 合同范本>
  • 心得体会>
  • 工作报告>
  • 党团相关>
  • 幼儿/小学教育>
  • 高等教育>
  • 经济/贸易/财会>
  • 建筑/环境>
  • 金融/证券>
  • 医学/心理学>
  • ImageVerifierCode 换一换
    首页 三一文库 > 资源分类 > DOC文档下载  

    JavaWeb应用开发技术课程设计-图书馆借阅管理系统.doc

    • 资源ID:5014951       资源大小:1.52MB        全文页数:49页
    • 资源格式: DOC        下载积分:6
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录   微博登录  
    二维码
    微信扫一扫登录
    下载资源需要6
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    JavaWeb应用开发技术课程设计-图书馆借阅管理系统.doc

    JavaWeb应用开发技术课程设计 题目:图书馆借阅管理系统院 系: 计算机科学与工程学院 学科专业: 网络工程 指导老师: 小组成员: 时 间: 2011-2012第1学期第20周 目录一、任务书3二、实验目的4三、需求分析4四、系统流程图5五、详细设计61、数据库设计 62、核心代码93、程序实现使用流程10六、实验总结19七、参考文献19二、实验目的:1、培养运用JSP语句制作网页的能力;2、活用所学的JSP知识制作简单的循环网页;3、实现NetBeans到数据库的链接;三、需求分析:图书借阅管理系统在各个图书馆、学校都有着至关重要的作用。在制作图书借阅管理系统之前,首先要知道所要做的系统可以实现哪些功能,要清楚不同级别的用户具有什么样的功能,实现什么样的界面。当明确了这些,项目开发的思路就清晰了,然后再对校园图书馆的系统进行考察、分析,从中吸取经验,并结合本系统的要求以及实际情况,设计出一个合理的系统。本图书借阅管理系统旨在构建此类平台,实现不同模块的功能设计。用户注册后登录,进入图书借阅,对图书的查看及借阅,以完成相应需求。本系统功能模块大致分为:用户登录借阅和管理员对图书及用户的管理。本系统是用jsp、sqlserver等WEB开发技术或网络工具完成一个的基本的图书借阅管理系统。四、系统流程图:注册登录管理员普通用户用户管理图书管理图书借阅图书查询借阅查看浏览所有用户查询用户查询修改载入查询五、详细设计:1、数据库设计:经过对图书借阅管理系统的需求分析,设计出该系统所需的数据库,名称为“test”。在数据库中共包括四个数据表:表users表book表guanli表jieyue12、过程代码:1、 在在netbeans中新建一个名为sherry的web应用程序:2、 将数据库驱动加入netbeans下的文件夹中,加入驱动程序:com.microsoft.sqlserver.jdbc.SQLServerDriverjdbc:sqlserver:/localhost:1433;DatabaseName=test","sa","kira"3、核心代码:首页:<head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>登陆首页</title><style type="text/css"><!-.STYLE1 font-size: 24px.STYLE2 font-size: 36px-></style></head><body bgcolor="#AEEEEE"><p align="center"><span class="STYLE2">西安工业大学图书馆&nbsp;&nbsp;&nbsp;登陆首页</span></p><form action="denglu1.jsp" method="post"><table width="529" height="218" border="1" align="center"><tr><td width="129"><span class="STYLE1">&nbsp;用户名:</span></td><td width="384"><label><input name="id" type="text" class="STYLE1" /><span class="STYLE1"><a href="zhuce1.jsp">注册</a></span></label></td></tr><tr><td><span class="STYLE1">&nbsp;&nbsp;密码:</span></td><td><label> <input name="pass" type="password" class="STYLE1" /></label></td></tr><tr><td height="63" colspan="2"><div align="center"><label><select name="select" class="STYLE1"><option value="user" selected>普通用户</option><option value="guanli">管理员</option></select></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="Submit" type="submit" class="STYLE1" value="登录" /> </div></td></tr></table></form></body></html>(1) 登录:<%page import="java.sql.*" %><%String susername=request.getParameter("id"); String isusername=new String(susername.getBytes("gb2312");String spassword=request.getParameter("pass"); String ispassword=new String(spassword.getBytes("gb2312");String sselect=request.getParameter("select"); Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");Connection con=DriverManager.getConnection("jdbc:sqlserver:/localhost:1433;DatabaseName=test","sa","kira");Statement sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);ResultSet rs;if(sselect.equals("user")rs=sql.executeQuery("select * from users where userID='"+susername+"' and upass='"+spassword+"'");if(rs.next()response.sendRedirect("huanying.jsp");elseresponse.sendRedirect("cuowu1.jsp");elsers=sql.executeQuery("select * from guanli where guanliID='"+susername+"' and gpass='"+spassword+"'");if(rs.next()response.sendRedirect("huanying1.jsp");elseresponse.sendRedirect("cuowu1.jsp");con.close();%></body></html><%/获取登录时输入的用户名并储存起来session.setAttribute("id",susername);%>登陆错误:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>登录错误</title><style type="text/css"><!-.STYLE1 font-size: 36px.STYLE2 font-size: 24px-></style></head>(2)注册:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>注册</title><style type="text/css"><!-.STYLE1 font-size: 36px.STYLE2 font-size: 24px-></style></head><body bgcolor="#AEEEEE"><div align="center"> <p class="STYLE1">普通用户注册</p></div> <form action="zhuce2.jsp" method="post"><table width="568" height="237" border="1" align="center"> <tr> <td width="129" height="70"><span class="STYLE2">用户名:</span></td> <td width="384"><label> <input name="ming" type="text" class="STYLE2" /> <span class="STYLE2"><a href="index.jsp">退出</a></span></label></td> </tr> <tr> <td height="63"><span class="STYLE2">密码:</span></td> <td height="63"><input name="pass" type="password" class="STYLE2" /></td> </tr> <tr> <td height="63" colspan="2"><label></label> <div align="center"> <input name="Submit" type="submit" class="STYLE2" value="提交" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input name="Submit2" type="reset" class="STYLE2" value="重置" /></div></td> </tr></table> </form><p>&nbsp;</p></body><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>注册成功</title><style type="text/css"><!-.STYLE1 font-size: 36px.STYLE2 font-size: 24px-></style></head><body bgcolor="#AEEEEE"><%page import="java.sql.*" %><%String sming=request.getParameter("ming");String ming=new String(sming.getBytes("gb2312");String spassword=request.getParameter("pass");String password=new String(spassword.getBytes("gb2312"); Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");Connection con=DriverManager.getConnection("jdbc:sqlserver:/localhost:1433;DatabaseName=test","sa","kira");Statement sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);ResultSet rs=sql.executeQuery("select * from users where userID='"+ming+"'");if(rs.next()response.sendRedirect("cuowu2.jsp");elsesql.executeUpdate("insert into users(userID,upass) values('"+ming+"','"+password+"')"); out.print("<p align="+"center"+"><span class="+"STYLE1>"+ming+" 普通用户注册成功,请记好您的ID号!"+"</span></p>");con.close();%></body></html>(3)借阅:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>西安工业大学图书借阅</title><style type="text/css"><!-.STYLE1 font-size: 36px.STYLE2 font-size: 24px-></style></head><body bgcolor="#AEEEEE"><div align="center"><span class="STYLE1">图书借阅</span></div><p>&nbsp;</p><table width="350" height="274" border="1" align="center"> <tr> <td><div align="center" class="STYLE1"><a href="jieyue3.jsp">借阅查看</a></div></td> </tr> <tr> <td><div align="center" class="STYLE1"><a href="jieyue2.jsp">图书查询</a></div></td> </tr> <tr> <td><div align="center" class="STYLE1"><a href="jieyue4.jsp">图书借阅</a></div></td> </tr> <tr> <td><div align="center" class="STYLE1"><a href="index.jsp">退出</a></div></td> </tr></table></body></html>查询图书:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>查看所有图书信息</title><style type="text/css"><!-.STYLE1 font-size: 36px.STYLE2 font-size: 24px-></style></head><body bgcolor="#AEEEEE"><p align="center"><span class="STYLE1">图书借阅</span></p><table width="973" height="58" border="1" align="center"> <tr> <td class="STYLE2"><div align="center"><a href="jieyue3.jsp">借阅查看</a></div></td> <td><div align="center" class="STYLE2"><a href="jieyue2.jsp">图书查询</a></div></td> <td><div align="center" class="STYLE2"><a href="jieyue4.jsp">图书借阅</a></div></td> <td><div align="center" class="STYLE2"><a href="index.jsp">退出</a></div></td> </tr></table><p>&nbsp;</p><%page import="java.sql.*" %><%Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");Connection con=DriverManager.getConnection("jdbc:sqlserver:/localhost:1433;DatabaseName=test","sa","kira");Statement sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);response.getContentType(); request.getCharacterEncoding(); response.setContentType("text/html;charset=gb2312"); request.setCharacterEncoding("gb2312"); ResultSet rs=sql.executeQuery("select * from book"); out.print("<p align="+"center"+"><span class="+"STYLE2"+">数据库中的书目如下: </span></p>"); out.print("<table border align="+"center"+">");out.print("<tr>");out.print("<th width=120>书号</td>");out.print("<th width=120>书名</td>");out.print("<th width=120>作者</td>"); out.print("<th width=120>出版社</td>"); out.print("<th width=120>库存量</td>"); out.print("<tr>");while(rs.next()String a,b,c,d,e;a=rs.getString(1);out.print("<td>"+a+"</td>");b=rs.getString(2);out.print("<td>"+b+"</td>");c=rs.getString(3);out.print("<td>"+c+"</td>");d=rs.getString(4);out.print("<td>"+d+"</td>");e=rs.getString(5);out.print("<td>"+e+"</td>");out.print("<tr>"); con.close();%></body></html><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>借阅图书查询</title><style type="text/css"><!-.STYLE1 font-size: 36px.STYLE2 font-size: 24px-></style></head><body bgcolor="#AEEEEE"><p align="center"><span class="STYLE1">图书借阅</span></p><table width="973" height="58" border="1" align="center"> <tr> <td class="STYLE2"><div align="center"><a href="jieyue3.jsp">借阅查看</a></div></td> <td><div align="center" class="STYLE2">图书查询</div></td> <td><div align="center" class="STYLE2"><a href="jieyue4.jsp">图书借阅</a></div></td> <td><div align="center" class="STYLE2"><a href="index.jsp">退出</a></div></td> </tr></table><p>&nbsp;</p><form action="jy1.jsp" method="post"><p align="center"> <input name="Submit2" type="submit" class="STYLE2" value="查看所有图书信息" /></p></form><form action="jy2.jsp" method="post"><table width="595" height="84" border="1" align="center"> <tr> <td><div align="center" class="STYLE2">书号: <input name="shuhao" type="text" class="STYLE2" /> &nbsp; <input name="Submit" type="submit" class="STYLE2" value="查询" /> </div></td> </tr></table></form></body></html><html> <head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>查询图书信息</title><style type="text/css"><!-.STYLE1 font-size: 36px.STYLE2 font-size: 24px-></style></head><body bgcolor="#AEEEEE"><p align="center"><span class="STYLE1">图书借阅</span></p><table width="973" height="58" border="1" align="center"> <tr> <td class="STYLE2"><div align="center"><a href="jieyue3.jsp">借阅查看</a></div></td> <td><div align="center" class="STYLE2"><a href="jieyue2.jsp">图书查询</a></div></td> <td><div align="center" class="STYLE2"><a href="jieyue4.jsp">图书借阅</a></div></td> <td><div align="center" class="STYLE2"><a href="index.jsp">退出</a></div></td> </tr></table><p>&nbsp;</p><%page import="java.sql.*" %><%String sbook=request.getParameter("shuhao"); String isbook=new String(sbook.getBytes("gb2312"); Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");Connection con=DriverManager.getConnection("jdbc:sqlserver:/localhost:1433;DatabaseName=test","sa","kira");Statement sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);response.getContentType(); request.getCharacterEncoding(); response.setContentType("text/html;charset=gb2312"); request.setCharacterEncoding("gb2312"); ResultSet rs; rs=sql.executeQuery("select * from book where bookno='"+isbook+"'"); if(rs.next()rs.previous(); out.print("<p align="+"center"+"><span class="+"STYLE2"+">查询成功: </span></p>"); out.print("<table border align="+"center"+">");out.print("<tr>");out.print("<th width=120>书号</td>");out.print("<th width=120>书名</td>");out.print("<th width=120>作者</td>"); out.print("<th width=120>出版社</td>"); out.print("<th width=120>库存量</td>"); out.print("<tr>");while(rs.next()String a,b,c,d,e;a=rs.getString(1);out.print("<td>"+a+"</td>");b=rs.getString(2);out.print("<td>"+b+"</td>");c=rs.getString(3);out.print("<td>"+c+"</td>");d=rs.getString(4);out.print("<td>"+d+"</td>");e=rs.getString(5);out.print("<td>"+e+"</td>");out.print("<tr>"); else out.print("无此书(图书编号:"+isbook+"')!"); rs=sql.executeQuery("select * from book "); out.print("<p align="+"center"+"><span class="+"STYLE2"+">数据库中的书目如下: </span></p>"); out.print("<table border align="+"center"+">");out.print("<tr>");out.print("<th width=120>书号</td>");out.print("<th width=120>书名</td>");out.print("<th width=120>作者</td>"); out.print("<th width=120>出版社</td>"); out.print("<th width=120>库存量</td>"); out.print("<tr>");while(rs.next()String a,b,c,d,e;a=rs.getString(1);out.print("<td>"+a+"</td>");b=rs.getString(2);out.print("<td>"+b+"</td>");c=rs.getString(3);out.print("<td>"+c+"</td>");d=rs.getString(4);out.print("<td>"+d+"</td>");e=rs.getString(5);out.print("<td>"+e+"</td>");out.print("<tr>"); con.close();%></body></html>查看:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>用户借阅查看</title><style type="text/css"><!-.STYLE1 font-size: 36px.STYLE2 font-size: 24px-></style></head><body bgcolor="#AEEEEE"><p align="center"><span class="STYLE1">图书借阅</span></p><table width="973" height="58" border="1" align="center"> <tr> <td class="STYLE2"><div align="center">借阅查看</div></td> <td><div align="center" class="STYLE2"><a href="jieyue2.jsp">图书查询</a></div></td> <td><div align="center" class="STYLE2"><a href="jieyue4.jsp">图书借阅</a></div></td> <td><div align="center" class="STYLE2"><a href="index.jsp">退出</a></div></td> </tr></table><p align="center" class="STYLE2"><%=session.getAttribute("id")%>用户的借阅信息:</p><p>&nbsp;</p><form action="jy3.jsp" method="post"><p class="STYLE2">确认用户名: <input name="id" type="text" class="STYLE2" />&nbsp;<input name="Submit" type="submit" class="STYLE2" value="确定" /></p></form></body></html><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>用户借阅查看</title><style type="text/css"><!-.STYLE1 font-size: 36px.STYLE2 font-size: 24px-></style></head><body bgcolor="#AEEEEE"><p align="center"><span c

    注意事项

    本文(JavaWeb应用开发技术课程设计-图书馆借阅管理系统.doc)为本站会员(哈尼dd)主动上传,三一文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    经营许可证编号:宁ICP备18001539号-1

    三一文库
    收起
    展开