一、源码特点
JSP 绘本租赁管理系统是一套完善的web设计系统serlvet+dao+bean(MVC模式),对理解JSP java编程开发语言有帮助,系统具有完整的源代码和数据库,开发环境为
TOMCAT7.0,Myeclipse8.5开发,数据库为Mysql5.0,使用java语言开发,系统主要采用B/S模式开发。
JSP 绘本租赁管理系统myeclipse开发mysql数据
下载地址:
/download/qq_41221322/85635587/download/qq_41221322/85635587
二、功能介绍
后台主要功能:
(1)权限管理:对权限信息进行添加、删除、修改和查看
(2)用户管理:对用户信息进行添加、删除、修改和查看
(3)绘本类型管理:对绘本类型信息进行添加、删除、修改和查看
(4)儿童绘本管理:对儿童绘本信息进行添加、删除、修改和查看
(5)评价管理:对评价信息进行添加、删除、修改和查看
(6)订单管理:对订单信息进行添加、删除、修改和查看
(7)订单明细管理:对订单明细信息进行添加、删除、修改和查看
(8)新闻管理:对新闻信息进行添加、删除、修改和查看
(9)公告管理:对公告信息进行添加、删除、修改和查看
前台主要功能:
系统首页
网站新闻浏览
系统公告
商品浏览
购物车
查看订单
我的续借
(1)权限信息表如表5.1所示:
表5.1 权限信息表
(2)用户信息表如表5.2所示:
表5.2 用户信息表
(3)绘本类型信息表如表5.3所示:
表5.3 绘本类型信息表
(4)绘本信息表如表5.4所示:
表5.4 绘本信息表
(5)评价信息表如表5.5所示:
表5.5 评价信息表
(6)订单信息表如表5.6所示:
表5.6 订单信息表
(7)订单明细信息表如表5.7所示:
表5.7 订单明细信息表
(8)新闻信息表如表5.8所示:
表5.8 新闻信息表
(9)公告信息表如表5.9所示:
表5.9 公告信息表
package com.servlet;import java.io.IOException;import java.io.PrintWriter;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import javax.servlet.http.HttpSession;import com.bean.hblx;import com.dao.hblxDao;import java.util.List;import java.sql.ResultSet;public class hblxServlet extends HttpServlet {public void service(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {request.setCharacterEncoding("gb2312");System.out.println("method"+request.getParameter("method"));String method=(String)request.getParameter("method");if(method.equals("insert")){//绘本类型添加insertM(request, response);}else if(method.equals("list")){//绘本类型列表ListM(request, response);}else if(method.equals("delete")){//绘本类型删除deleteM(request, response);}else if(method.equals("modifyindex")){//绘本类型修改页面modifyIndex(request, response);}else if(method.equals("modify")){//绘本类型修改modifyM(request, response);}else if(method.equals("detail")){//绘本类型详细信息detailM(request, response);}else if(method.equals("Plist")){//绘本类型列表信息PListM(request, response);}}private void insertM(HttpServletRequest request, HttpServletResponse response){//绘本类型添加hblxDao dao=new hblxDao();hblx hblx=new hblx();hblx.setHblxid((String)request.getParameter("keyid"));hblx.setLx((String)request.getParameter("lx"));response.setCharacterEncoding("gb2312");try {dao.insert(hblx);request.setAttribute("flag", "操作成功"); request.getRequestDispatcher("hblx/hblxadd.jsp").forward(request, response);} catch (Exception e) {e.printStackTrace();}}private void ListM(HttpServletRequest request, HttpServletResponse response){//绘本类型信息列表ResultSet rs=null;hblxDao dao = new hblxDao();System.out.println("alist");String sql="";response.setCharacterEncoding("gb2312");try{rs=dao.qlist(sql);PrintWriter out = response.getWriter();request.setAttribute("rs", rs); request.getRequestDispatcher("hblx/hblxlist.jsp").forward(request, response);}catch(Exception e){e.toString();e.printStackTrace();}}private void PListM(HttpServletRequest request, HttpServletResponse response){//测试信息列表ResultSet rs=null;hblxDao dao = new hblxDao();String str=(String)request.getParameter("Page");String sql="";response.setCharacterEncoding("gb2312");try{if(str==null){str="0";}rs=dao.qlist(sql);PrintWriter out = response.getWriter();request.setAttribute("rs", rs); request.getRequestDispatcher("hblx/hblxPlist.jsp?Page=1").forward(request, response);}catch(Exception e){e.toString();e.printStackTrace();}}private void modifyIndex(HttpServletRequest request, HttpServletResponse response){//绘本类型修改首页ResultSet rs=null;response.setCharacterEncoding("gb2312");hblxDao dao = new hblxDao();String keyid=(String)request.getParameter("keyid");String sql="";if(keyid!=null&&!keyid.equals("")){sql+=" and hblxid='"+keyid+"'";}try{rs=dao.qlist(sql);PrintWriter out = response.getWriter();request.setAttribute("rs", rs); request.getRequestDispatcher("hblx/hblxmodify.jsp").forward(request, response);//response.sendRedirect("hblx/hblxmodify.jsp");}catch(Exception e){e.toString();e.printStackTrace();}}private void detailM(HttpServletRequest request, HttpServletResponse response){//绘本类型详细信息页面ResultSet rs=null;response.setCharacterEncoding("gb2312");hblxDao dao = new hblxDao();String keyid=(String)request.getParameter("keyid");String sql="";if(keyid!=null&&!keyid.equals("")){sql+=" and hblxid='"+keyid+"'";}try{rs=dao.qlist(sql);request.setAttribute("rs", rs); request.getRequestDispatcher("hblx/hblxdetail.jsp").forward(request, response);}catch(Exception e){e.toString();e.printStackTrace();}}private void deleteM(HttpServletRequest request, HttpServletResponse response){//绘本类型删除ResultSet lst=null;hblxDao dao = new hblxDao();response.setCharacterEncoding("gb2312");String keyid=(String)request.getParameter("keyid"); try{dao.delete(keyid);request.setAttribute("flag", "删除成功"); request.getRequestDispatcher("hblxServlet?method=list").forward(request, response);//response.sendRedirect("hblxServlet?method=list");}catch(Exception e){e.toString();e.printStackTrace();}}private void modifyM(HttpServletRequest request, HttpServletResponse response){//绘本类型修改功能hblxDao dao=new hblxDao();hblx hblx=new hblx();hblx.setHblxid((String)request.getParameter("keyid"));hblx.setLx((String)request.getParameter("lx"));response.setCharacterEncoding("gb2312");try {dao.modify(hblx);PrintWriter out = response.getWriter();request.setAttribute("flag", "操作成功"); request.getRequestDispatcher("hblxServlet?method=list").forward(request, response);//response.sendRedirect("hblxServlet?method=list");} catch (Exception e) {e.printStackTrace();}}}
三、注意事项
1、管理员账号:admin密码:admin 数据库配置文件DBO.java
2、开发环境为TOMCAT7.0,Myeclipse8.5开发,数据库为Mysql5.0,使用java语言开发。
3、数据库文件名是jspshbgl.sql,系统名称hbzl
4、系统首页地址:http://127.0.0.1:8080/hbzl/shouye.jsp