这是一个图书馆管理系统的jsp代码
源代码在线查看: addbook.jsp~12~
Add Book
.style3 {font-size: 24px}
.style4 {font-size: 18px}
-->
Adduser
Modifyuser
Deletuser
Searchuser
Addbook
Deletebook
Borrowsearch
Search
Userpay
Update
Add Book
Serial NO.:
Sort NO.:
Title:
Author1:
Author2:
Author3:
Cover:
Book Conern:
Public Day:
ISBN:
Times:
Prize:
In NO.:
try{
if(request.getParameter("enter")!=null){
Connection conn=Library.getConn();
Statement stmt=conn.createStatement();
String serialnumber = request.getParameter("serialnumber");
String sortnumber = request.getParameter("sortnumber");
String title = request.getParameter("title");
String author1 = request.getParameter("author1");
String author2 = request.getParameter("author2");
String author3 = request.getParameter("author3");
String cover = request.getParameter("cover");
String bookconcern = request.getParameter("bookconcern");
String publicday =request.getParameter("publicday");
String isbn = request.getParameter("isbn");
int times = Integer.parseInt(request.getParameter("times"));
int prize = Integer.parseInt(request.getParameter("prize"));
int innumber = Integer.parseInt(request.getParameter("innumber"));
String insertStr = "insert into book(serialnumber,sortnumber,title,author1,author2,author3,cover,bookconcern,publicday,isbn,times,prize,innumber,outnumber) values('" + serialnumber + "','" + sortnumber + "','" + title + "','" + author1 + "','" + author2 + "','" + author3 + "','" + cover + "','" + bookconcern + "','" + publicday + "','" + isbn + "','" + times + "','" + prize + "','" + innumber + "','0')";
stmt.execute(insertStr);
response.sendRedirect("success.jsp");
}
}catch (Exception ex) {
response.sendRedirect("fail.jsp");
ex.printStackTrace();}
%>