in
May-2016
Submitted By
Under the Guidance of
Gurleen Kaur Robin Singh
Assistant Professor (1610991721)
Department of Computer Science Samriti Kochhar
And Engineering (1610991765)
Jasmeen Kukreja
(1610991402)
Jatin
(1610991406)
Prince Walia
(1610991644)
This is to be certified that the project entitled “E-Library Management System” has been submitted for the
Bachelor of Computer Science Engineering at Chitkara University, Punjab during the academic semester January
2016- May-2016 is a bonafide piece of project work carried out by “Robin Singh (1610991721), Samriti
Kochhar(1610991765), Jasmeen Kukreja(1610991402), Jatin (1610991406), Prince Walia(1610991644)”
towards the partial fulfillment for the award of the course Integrated Project (Subject CODE) under the guidance
of “ Mrs. Gurleen” and supervision.
Gurleen Kaur
Assistant Professor
CANDIDATE’S DECLARATION
We, Robin Singh (1610991721), Samriti Kochhar (1610991765), Jasmeen Kukreja (1610991402), Jatin
(1610991406) , Prince Walia(1610991644), B.E.-2014 of the Chitkara University, Punjab hereby declare that
the Integrated Project Report entitled “E-Library Management System” is an original work and data provided
in the study is authentic to the best of our knowledge. This report has not been submitted to any other Institute
for the award of any other course.
Place:
Date:
(BE-2016) CSE
ACKNOWLEDGEMENT
It is our pleasure to be indebted to various people, who directly or indirectly contributed in the development of
this work and who influenced my thinking, behavior and acts during the course of study.
We express our sincere gratitude to all for providing me an opportunity to undergo Integrated Project as the
part of the curriculum.
We are thankful to “Project Guide Name” for his support, cooperation, and motivation provided to us during
the training for constant inspiration, presence and blessings.
We also extend our sincere appreciation to “Mrs. Gurleen” who provided her valuable suggestions and
precious time in accomplishing our Integrated project report.
Lastly, We would like to thank the almighty and our parents for their moral support and friends with whom we
shared our day-to day experience and received lots of suggestions that improve our quality of work.
2.1 Background
Online libraries became essential source for both faculty and research members in order to
obtain knowledge about different fields of sciences. Students all over the world are using for
their researches the materials available on online libraries so that they can accomplish their
tasks and day-to-day researches. E- Library Management System is an application which
refers to library systems which are used by librarians to manage the library using a
computerized system where he/she can record various transactions like issue of books,
return of books, addition of new books, addition of new students etc. Books and student
maintenance modules are also included in this system which would keep track of the
students using the library and also a detailed description about the books a library contains.
With this computerized system there will be no loss of book record or member record which
generally happens when a non computerized system is used. All these modules are able to
help librarian to manage the library with more convenience and in a more efficient way as
compared to library systems which are not computerized.
E-Library Management System is used in the effective dispatch of Library Management to all
of the staff. This system adopts a comprehensive approach to minimize the manual work and
schedule resources, time in a cogent manner. The core of the system is to get the online
Library platform ,Without an E-Library system storing all the details of the books,student ID
& Librarians is a tedious job for any organisation.Through this online system we can overcome
many problems like time and money saved, nothing is done manually.
The researchers seek to provide solution to the following problems:
1. Insufficient amenities and utilities in processing of the Issue and Return of books resulting
to unorganized record-keeping and gathering information.
2. The Librarians & Students are taking too much time of long processing of book issue and
return.
3. The record was kept into big record books which cannot accommodate the growing number
of the student & books.
The Traditional Library system is unable to cope with the high volume of books and
students.Among others, books issuing and maintining record of books are inherent problem of
Traditional Library system.An online library registration system needs to be developed in
addition Students on-campus, off-campus, in-state, out-state, out-of-country can easily and
inexpensively take advantage of many of services provided by the Library, which require users
to be on –campus during to use facilities. It helps to computerize everything and reducing the
errors as compared to manual libraray management system.Some extra features can also be
added like sms support, mail supportwhich leads to increase in response time.
3.SOFTWARE REQUIREMENT SPECIFICATION
3.1Methods
In this project we have used MVC pattern. MVC stands for Model, View and Controller. MVC
separates application into three components - Model, View and Controller.
Model: Model represents shape of the data and business logic. It maintains the data of the
application. Model objects retrieve and store model state in a database.
View: View is a user interface. View display data using model to the user and also enables
them to modify the data.
Controller: Controller handles the user request. Typically, user interact with View, which in-
turn raises appropriate URL request, this request will be handled by a controller. The controller
renders the appropriate view with the model data as a response.
1.
3.2Programming/Working Environment
In this project the programming language used is java . The web technologies used are jsp
and servlets. JSP technology is used to create web application just like Servlet technology. It
can be thought of as an extension to Servlet because it provides more functionality than
servlet such as expression language, JSTL, etc.
A JSP page consists of HTML tags and JSP tags. The JSP pages are easier to maintain than
Servlet because we can separate designing and development. It provides some additional
features such as Expression Language, Custom Tags, etc.
Servlet technology is used to create a web application (resides at server side and generates a
dynamic web page).
Servlet technology is robust and scalable because of java language. Before Servlet, CGI
(Common Gateway Interface) scripting language was common as a server-side programming
language.
MySQL Workbench
Apache Tomcat
Eclipse
4. DATABASE DESIGN
TABLE STRUCTURE
Books Table
Field Name Data Type Constraint
Call No VARCHAR(500) Primary Key
NAME VARCHAR(500)
AUTHOR VARCHAR(500)
PUBLISHER VARCHAR(500)
QUANTITY INT(11)
ISSUED INT(11)
Librarian Table
Field Name Data Type Constraint
ID INT(11) Primary Key
NAME VARCHAR(4000)
PASSWORD VARCHAR(4000)
EMAIL VARCHAR(4000)
MOBILE VARCHAR(4000)
ISSUEBOOK Table
Entity-Relationship Diagram
DATABASE IMPLEMENTATION
ADD BOOK
ADD LIBRARIAN
HOME LOGIN PAGE
RETURN BOOK
BOOK RETURNED
VIEW BOOK
VIEW BOOK ISSUED
VIEW LIBRARIAN
6. CODE IMPLEMENTATION
package com.robin.model;
public BookBean() {
super();
public BookBean(String callno, String name, String author, String publisher, int quantity) {
super();
this.callno = callno;
this.name = name;
this.author = author;
this.publisher = publisher;
this.quantity = quantity;
return callno;
this.callno = callno;
return name;
}
this.name = name;
return author;
this.author = author;
return publisher;
this.publisher = publisher;
return quantity;
this.quantity = quantity;
return issued;
this.issued = issued;
}
@Override
return "BookBean [callno=" + callno + ", name=" + name + ", author=" + author + ",
publisher=" + publisher
package com.robin.model;
import java.sql.Date;
public IssueBookBean() {}
super();
this.callno = callno;
this.studentid = studentid;
this.studentname = studentname;
this.studentmobile = studentmobile;
this.returnstatus = returnstatus;
return issueddate;
this.issueddate = issueddate;
return callno;
this.callno = callno;
return studentid;
this.studentid = studentid;
return studentname;
return studentmobile;
this.studentmobile = studentmobile;
@Override
+ "]";
package com.robin.model;
public LibrarianBean() {}
public LibrarianBean(int id, String name, String email, String password, long mobile) {
super();
this.id = id;
this.name = name;
this.email = email;
this.password = password;
this.mobile = mobile;
super();
this.name = name;
this.email = email;
this.password = password;
this.mobile = mobile;
return id;
this.id = id;
return name;
this.name = name;
this.email = email;
return password;
this.password = password;
return mobile;
this.mobile = mobile;
@Override
return "LibrarianBean [id=" + id + ", name=" + name + ", email=" + email + ",
password=" + password + ", mobile="
+ mobile + "]";
}
CONTROLLER FILE
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.model.BookBean;
import com.robin.data.BookDao;
@WebServlet("/AddBook")
public class AddBook extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Add Book Form</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navlibrarian.html").include(request, response);
out.println("<div class='container'>");
String callno=request.getParameter("callno");
String name=request.getParameter("name");
String author=request.getParameter("author");
String publisher=request.getParameter("publisher");
String squantity=request.getParameter("quantity");
int quantity=Integer.parseInt(squantity);
BookBean bean=new BookBean(callno,name,author,publisher,quantity);
int i=BookDao.save(bean);
if(i>0){
out.println("<h3>Book saved successfully</h3>");
}
request.getRequestDispatcher("addbookform.html").include(request,
response);
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.robin.data.LibrarianDao;
@WebServlet("/AddBookForm")
public class AddBookForm extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Add Book Form</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navlibrarian.html").include(request, response);
out.println("<div class='container'>");
request.getRequestDispatcher("addbookform.html").include(request,
response);
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.model.LibrarianBean;
import com.robin.data.LibrarianDao;
@WebServlet("/AddLibrarian")
public class AddLibrarian extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Add Librarian</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navadmin.html").include(request, response);
out.println("<div class='container'>");
String name=request.getParameter("name");
String email=request.getParameter("email");
String password=request.getParameter("password");
String smobile=request.getParameter("mobile");
long mobile=Long.parseLong(smobile);
LibrarianBean bean=new LibrarianBean(name, email, password, mobile);
LibrarianDao.save(bean);
out.print("<h4>Librarian added successfully</h4>");
request.getRequestDispatcher("addlibrarianform.html").include(request,
response);
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/AddLibrarianForm")
public class AddLibrarianForm extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Add Librarian Form</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navadmin.html").include(request, response);
out.println("<div class='container'>");
request.getRequestDispatcher("addlibrarianform.html").include(request,
response);
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@WebServlet("/AdminLogin")
public class AdminLogin extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Admin Section</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
String email=request.getParameter("email");
String password=request.getParameter("password");
if(email.equals("admin@gmail.com")&&password.equals("admin123")){
HttpSession session=request.getSession();
session.setAttribute("admin","true");
request.getRequestDispatcher("navadmin.html").include(request,
response);
request.getRequestDispatcher("admincarousel.html").include(request,
response);
}else{
request.getRequestDispatcher("navhome.html").include(request,
response);
out.println("<div class='container'>");
out.println("<h3>Username or password error</h3>");
request.getRequestDispatcher("adminloginform.html").include(request, response);
out.println("</div>");
}
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
package com.robin.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.data.BookDao;
@WebServlet("/DeleteBook")
public class DeleteBook extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
BookDao.delete(request.getParameter("callno"));
response.sendRedirect("ViewBook");
}
}
package com.robin.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.data.LibrarianDao;
@WebServlet("/DeleteLibrarian")
public class DeleteLibrarian extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String sid=request.getParameter("id");
int id=Integer.parseInt(sid);
LibrarianDao.delete(id);
response.sendRedirect("ViewLibrarian");
}
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.model.LibrarianBean;
import com.robin.data.LibrarianDao;
@WebServlet("/EditLibrarian")
public class EditLibrarian extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String sid=request.getParameter("id");
int id=Integer.parseInt(sid);
String name=request.getParameter("name");
String email=request.getParameter("email");
String password=request.getParameter("password");
String smobile=request.getParameter("mobile");
long mobile=Long.parseLong(smobile);
LibrarianBean bean=new LibrarianBean(id,name, email, password, mobile);
LibrarianDao.update(bean);
response.sendRedirect("ViewLibrarian");
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.model.LibrarianBean;
import com.robin.data.LibrarianDao;
@WebServlet("/EditLibrarianForm")
public class EditLibrarianForm extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Edit Librarian Form</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navadmin.html").include(request, response);
out.println("<div class='container'>");
String sid=request.getParameter("id");
int id=Integer.parseInt(sid);
LibrarianBean bean=LibrarianDao.viewById(id);
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.model.BookBean;
import com.robin.model.IssueBookBean;
import com.robin.data.BookDao;
@WebServlet("/IssueBook")
public class IssueBook extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Add Book Form</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navlibrarian.html").include(request, response);
out.println("<div class='container'>");
String callno=request.getParameter("callno");
String studentid=request.getParameter("studentid");
String studentname=request.getParameter("studentname");
String sstudentmobile=request.getParameter("studentmobile");
long studentmobile=Long.parseLong(sstudentmobile);
IssueBookBean bean=new
IssueBookBean(callno,studentid,studentname,studentmobile);
int i=BookDao.issueBook(bean);
if(i>0){
out.println("<h3>Book issued successfully</h3>");
}else{
out.println("<h3>Sorry, unable to issue book.</h3><p>We may have
sortage of books. Kindly visit later.</p>");
}
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/IssueBookForm")
public class IssueBookForm extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Issue Book Form</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navlibrarian.html").include(request, response);
out.println("<div class='container'>");
request.getRequestDispatcher("issuebookform.html").include(request,
response);
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.robin.data.LibrarianDao;
@WebServlet("/LibrarianLogin")
public class LibrarianLogin extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Librarian Section</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
String email=request.getParameter("email");
String password=request.getParameter("password");
if(LibrarianDao.authenticate(email, password)){
HttpSession session=request.getSession();
session.setAttribute("email",email);
request.getRequestDispatcher("navlibrarian.html").include(request,
response);
request.getRequestDispatcher("librariancarousel.html").include(request, response);
}else{
request.getRequestDispatcher("navhome.html").include(request,
response);
out.println("<div class='container'>");
out.println("<h3>Username or password error</h3>");
request.getRequestDispatcher("librarianloginform.html").include(request, response);
out.println("</div>");
}
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
}
package com.robin.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/LogoutAdmin")
public class LogoutAdmin extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.getSession().invalidate();
response.sendRedirect("index.html");
}
}
package com.robin.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/LogoutLibrarian")
public class LogoutLibrarian extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.getSession().invalidate();
response.sendRedirect("index.html");
}
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.model.IssueBookBean;
import com.robin.data.BookDao;
@WebServlet("/ReturnBook")
public class ReturnBook extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Return Book</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navlibrarian.html").include(request, response);
out.println("<div class='container'>");
String callno=request.getParameter("callno");
String sstudentid=request.getParameter("studentid");
int studentid=Integer.parseInt(sstudentid);
int i=BookDao.returnBook(callno,studentid);
if(i>0){
out.println("<h3>Book returned successfully</h3>");
}else{
out.println("<h3>Sorry, unable to return book.</h3><p>We may have
sortage of books. Kindly visit later.</p>");
}
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/ReturnBookForm")
public class ReturnBookForm extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>Return Book Form</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navlibrarian.html").include(request, response);
out.println("<div class='container'>");
request.getRequestDispatcher("returnbookform.html").include(request,
response);
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.model.BookBean;
import com.robin.model.LibrarianBean;
import com.robin.data.BookDao;
import com.robin.data.LibrarianDao;
@WebServlet("/ViewBook")
public class ViewBook extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>View Book</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navlibrarian.html").include(request, response);
out.println("<div class='container'>");
List<BookBean> list=BookDao.view();
out.println("<tr><th>Callno</th><th>Name</th><th>Author</th><th>Publisher</th
><th>Quantity</th><th>Issued</th><th>Delete</th></tr>");
for(BookBean bean:list){
out.println("<tr><td>"+bean.getCallno()+"</td><td>"+bean.getName()+"</td><td>"
+bean.getAuthor()+"</td><td>"+bean.getPublisher()+"</td><td>"+bean.getQuantity()+"</td
><td>"+bean.getIssued()+"</td><td><a
href='DeleteBook?callno="+bean.getCallno()+"'>Delete</a></td></tr>");
}
out.println("</table>");
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.model.BookBean;
import com.robin.model.IssueBookBean;
import com.robin.data.BookDao;
@WebServlet("/ViewIssuedBook")
public class ViewIssuedBook extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>View Issued Book</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navlibrarian.html").include(request, response);
out.println("<div class='container'>");
List<IssueBookBean> list=BookDao.viewIssuedBooks();
out.println("<tr><td>"+bean.getCallno()+"</td><td>"+bean.getStudentid()+"</td><t
d>"+bean.getStudentname()+"</td><td>"+bean.getStudentmobile()+"</td><td>"+bean.getIs
sueddate()+"</td><td>"+bean.getReturnstatus()+"</td></tr>");
}
out.println("</table>");
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
}
package com.robin.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.robin.model.LibrarianBean;
import com.robin.data.LibrarianDao;
@WebServlet("/ViewLibrarian")
public class ViewLibrarian extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.print("<!DOCTYPE html>");
out.print("<html>");
out.println("<head>");
out.println("<title>View Librarian</title>");
out.println("<link rel='stylesheet' href='bootstrap.min.css'/>");
out.println("</head>");
out.println("<body>");
request.getRequestDispatcher("navadmin.html").include(request, response);
out.println("<div class='container'>");
List<LibrarianBean> list=LibrarianDao.view();
out.println("<tr><th>Id</th><th>Name</th><th>Email</th><th>Password</th><th>
Mobile</th><th>Edit</th><th>Delete</th></tr>");
for(LibrarianBean bean:list){
out.println("<tr><td>"+bean.getId()+"</td><td>"+bean.getName()+"</td><td>"+bea
n.getEmail()+"</td><td>"+bean.getPassword()+"</td><td>"+bean.getMobile()+"</td><td><
a href='EditLibrarianForm?id="+bean.getId()+"'>Edit</a></td><td><a
href='DeleteLibrarian?id="+bean.getId()+"'>Delete</a></td></tr>");
}
out.println("</table>");
out.println("</div>");
request.getRequestDispatcher("footer.html").include(request, response);
out.close();
}
}
DATABASE CONNECTIVITY
package com.robin.data;
import java.sql.*;
public class DB {
return con;
}
}
7. SYSTEM TESTING
Implementation is the stage in the project where the theoretical design is turned into a working
system and is giving confidence on the new system for the users that it will work efficiently
and effectively. It involves careful planning, investigation of the current system and its
constraints on implementation, design of methods to achieve the change over, an evaluation of
change over methods. Apart from planning major task of preparing the implementation are
education and training of users. The implementation process begins with preparing a plan for
the implementation of the system. According to this plan, the activities are to be carried out,
discussions made regarding the equipment and resources and the additional equipment has to
be acquired to implement the new system. The system can be implemented only after thorough
testing is done and if it is found to be working according to the specification.
As the part of system testing we execute the program with the intent of finding errors and
missing operations and also a complete verification to determine whether the objectives are
met and the user requirements are satisfied. The ultimate aim is quality assurance. Tests are
carried out and the results are compared with the expected document. In the case of erroneous
results, debugging is done. Using detailed testing strategies a test plan is carried out on each
module. The various tests performed are unit testing, integration testing and user acceptance
testing.The testing process focuses on logical intervals of the software ensuring that all the
statements have been tested and on functional interval is conducting test to uncover errors and
ensure that the defined input will produce actual results that agree with the required results.
Program level testing ,module level testing integerated and carried out.
.
Unit Testing
The software units in the system is are modules and routines that are assembled and integrated
to perform a specific function. As a part of unit testing we executed the program for individual
modules independently. This enables, to detect errors in coding and logic that are contained
within each of the three module. This testing includes entering data that is filling forms and
ascertaining if the value matches to the type and entered into the database. The various controls
are tested to ensure that each performs its action as required.
Integration Testing
Data can be lost across any interface, one module can have an adverse effect on another, sub
functions when combined, may not produce the desired major functions. Integration testing is
a systematic testing to discover errors associated within the interface. The objective is to take
unit tested modules and build a program structure. All the modules are combined and tested as
a whole. Here the admin module, sec module and student module options are integrated and
tested. This testing provides the assurance that the application is well integrated functional unit
with smooth transition of data.
abc123
10.BIBLIOGRAPHY/REFRENCES
1.www.wikipedia.com