1、编号、书名、作者、出版社、出版日期。项目设计 选择开发模型MVC第二章:总体设计2.1本系统的主要功能:1、基于MVC模式开发该Java Web项目;2、本系统有两类用户角色,普通用户和管理员用户;3、普通用户:4、管理员用户管理系统各项信息,包括:5、建立的图书类包含如下信息:2.2 Java源文件及其功能(功能在下一章讲述):Index.jsp% page contentType=text/html;charset=UTF-8 language=java %html title/title/headbodycenterh2欢迎进入图书馆里系统!/h2pform method=post ac
2、tion=/servlets/depend.do 普通用户br 管理员用户editer 管理员密码/center/body/htmlManager.jsp%- Created by IntelliJ IDEA. User: Administrator Date: 14-5-31 Time: 下午3:59 To change this template use File | Settings | File Templates.-% import=java.util.ArrayList,bean.bookinfoa href=/add.jsp添加图书table align=center borde
3、r=1 trfont size=2 face=黑体 color=blueth编号书名作者出版社出版日期th colspan=管理/tr% request.setCharacterEncoding(utf-8); ArrayList list=(ArrayListtd%= bi.getId()%/td%= bi.getName()%= bi.getAuthor()%= bi.getPress()%= bi.getDate()%/servlets/edit.do?id=修改/servlets/delete.do?删除Reader.jspform action=/servlets/borrow.do
4、 method=caption现有图书信息td colspan=6 align=right/check.jsp点击查询借阅borrow123hiddenid提交Success.jsp 14-6-1 下午1:34操作成功/servlets/list.do浏览图书信息Finalcheck.jsp 下午4:15bean.bookinfo bookinfo bi=(bookinfo)request.getAttribute(biSuccessreader.jsp/servlets/listreader.doFailure.jsp 下午2:00操作失败javascript:history.back()点
5、击返回修改信息form name=form1 onsubmit=return check()/servlets/add.do图书信息添加Common.jsfunction check() if(form1.id.value=) alert (no id! form1.id.focus(); return false; if(form1.name.value= alert(no name! form1.name.focus(); if(form1.author.value= alert(no author! form1.author.focus(); if(form1.press.value=n
6、o press! form1.press.focus(); if(form1.date.value=)no date! form1.date.focus();Bookinfo.javapackage bean;import java.lang.Exception;import java.lang.String;import java.lang.System;import java.sql.*;import java.sql.Connection;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Stat
7、ement;import java.util.*;import java.util.ArrayList;public class bookinfo private String id; private String name; private String author; private String press; private String date; public void setName(String name) this.name = name; public String getName() return name; public void setAuthor(String author) this.author = author; public String getAuthor() return author; public void setDate(String date) this.date = date; public String getDate() return date; public void setPress(String press) this.press = press; public String getPres
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1