Вы находитесь на странице: 1из 46

(BE-2016) CSE

INTEGRATED PROJECT REPORT


On

E-LIBRARY MANAGEMENT SYSTEM

Submitted in partial fulfillment of the requirement for the


Course Integrated Project (CSP2208) of

COMPUTER SCIENCE AND ENGINEERING


B.E. Batch-2016

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)

SCHOOL OF COMPUTER SCIENCES


CHITKARA UNIVERSITY
PUNJAB
CERTIFICATE

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.

Sign. of Project Guide :

Gurleen Kaur

Assistant Professor

Department of Computer Science and Engineering


(BE-2016) CSE

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.

Sign. of Student 1 Sign. of Student 2 Sign. of Student 3


Robin Singh Samriti Kochhar Jasmeen Kukreja
ID No 1610991721 ID No 1610991765 ID No 1610991402

Sign. of Student 4 Sign. of Student 5


Jatin Prince Walia
ID No 1610991406 ID No 1610991644

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.

Robin Singh Samriti Kochhar Jasmeen Kukreja Jatin Prince Walia


ID No-1610991721 ID No-1610991765 ID No-1610991402 ID No-1610991402 ID No-1610991644
1. ABSTRACT

E-Library management system is a project which aims in developing a computerized system


to maintain all the daily work of library. This project has many features which are generally
not available in normal library management systems like an admin panel where admin can
view all the librarians. The librarian after logging into his account can Add , Edit, Delete
,Issue and Return books . Overall this project of ours is being developed to help staff of
library to maintain the library in the best way possible and also reduce the human efforts.
2. INTRODUCTION

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.

2.2 Problem Statement

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.

Model is a data and business logic.

View: View is a user interface. View display data using model to the user and also enables
them to modify the data.

View is a User Interface.

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.

Controller is a request handler.

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.

3.3Requirements to run the application

 MySQL Workbench
 Apache Tomcat
 Eclipse
4. DATABASE DESIGN

The general theme behind a database is to handle information as an integerated whole.A


database is a collection of interrelated data stored with mininum redundancy to serve many
users quickly and efficiently .The general objective is to make information access easy quick
and flexible for users.In database design several objectives are considered.Redundant occupies
space and therefore is wasteful if the versions of data are in different phases of updating the
system offten gives conflicting information. A unique aspect of database design is storing only
once which controls redundancy and improves system performance.

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

Field Name Data Type Constraint


CALL NO VARCHAR(4000)
STUDENT ID VARCHAR(4000)
STUDENT NAME VARCHAR(4000)
STUDENT MOBILE INT(11)
ISSUE DATE DATE
RETURN STATUS VARCHAR(4000)

Entity-Relationship Diagram
DATABASE IMPLEMENTATION

In this project we have used MySQL Workbench as the database.

MySQL is a relational database management system(RBDMS) that runs as a server providing


multi user which access to a number of databases.A table is the section of the database for
storing related information.In a table wex will setup different fields.
5. PROJECT DESIGNING

ADD BOOK

ADD LIBRARIAN
HOME LOGIN PAGE

ISSUE BOOK(NOT ISSUED)


ISSUE BOOK FORM

BOOK ISSUED CONFIRMED


LIBRARIAN SECTION

RETURN BOOK
BOOK RETURNED

VIEW BOOK
VIEW BOOK ISSUED

VIEW LIBRARIAN
6. CODE IMPLEMENTATION

package com.robin.model;

public class BookBean {

private String callno,name,author,publisher;

private int quantity,issued;

public BookBean() {

super();

// TODO Auto-generated constructor stub

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;

public String getCallno() {

return callno;

public void setCallno(String callno) {

this.callno = callno;

public String getName() {

return name;
}

public void setName(String name) {

this.name = name;

public String getAuthor() {

return author;

public void setAuthor(String author) {

this.author = author;

public String getPublisher() {

return publisher;

public void setPublisher(String publisher) {

this.publisher = publisher;

public int getQuantity() {

return quantity;

public void setQuantity(int quantity) {

this.quantity = quantity;

public int getIssued() {

return issued;

public void setIssued(int issued) {

this.issued = issued;
}

@Override

public String toString() {

return "BookBean [callno=" + callno + ", name=" + name + ", author=" + author + ",
publisher=" + publisher

+ ", quantity=" + quantity + ", issued=" + issued + "]";

package com.robin.model;

import java.sql.Date;

public class IssueBookBean {

private String callno,studentid,studentname;

private long studentmobile;

private Date issueddate;

private String returnstatus;

public IssueBookBean() {}

public IssueBookBean(String callno, String studentid, String studentname, long


studentmobile) {

super();

this.callno = callno;

this.studentid = studentid;

this.studentname = studentname;

this.studentmobile = studentmobile;

public String getReturnstatus() {


return returnstatus;

public void setReturnstatus(String returnstatus) {

this.returnstatus = returnstatus;

public Date getIssueddate() {

return issueddate;

public void setIssueddate(Date issueddate) {

this.issueddate = issueddate;

public String getCallno() {

return callno;

public void setCallno(String callno) {

this.callno = callno;

public String getStudentid() {

return studentid;

public void setStudentid(String studentid) {

this.studentid = studentid;

public String getStudentname() {

return studentname;

public void setStudentname(String studentname) {


this.studentname = studentname;

public long getStudentmobile() {

return studentmobile;

public void setStudentmobile(long studentmobile) {

this.studentmobile = studentmobile;

@Override

public String toString() {

return "IssueBookBean [callno=" + callno + ", studentid=" + studentid + ",


studentname=" + studentname

+ ", studentmobile=" + studentmobile + ", issueddate=" + issueddate +


", returnstatus=" + returnstatus

+ "]";

package com.robin.model;

public class LibrarianBean {

private int id;

private String name,email,password;

private long mobile;

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;

public LibrarianBean(String name, String email, String password, long mobile) {

super();

this.name = name;

this.email = email;

this.password = password;

this.mobile = mobile;

public int getId() {

return id;

public void setId(int id) {

this.id = id;

public String getName() {

return name;

public void setName(String name) {

this.name = name;

public String getEmail() {


return email;

public void setEmail(String email) {

this.email = email;

public String getPassword() {

return password;

public void setPassword(String password) {

this.password = password;

public long getMobile() {

return mobile;

public void setMobile(long mobile) {

this.mobile = mobile;

@Override

public String toString() {

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.print("<form action='EditLibrarian' method='post' style='width:300px'>");


out.print("<div class='form-group'>");
out.print("<input type='hidden' name='id' value='"+bean.getId()+"'/>");
out.print("<label for='name1'>Name</label>");
out.print("<input type='text' class='form-control' value='"+bean.getName()+"'
name='name' id='name1' placeholder='Name'/>");
out.print("</div>");
out.print("<div class='form-group'>");
out.print("<label for='email1'>Email address</label>");
out.print("<input type='email' class='form-control'
value='"+bean.getEmail()+"' name='email' id='email1' placeholder='Email'/>");
out.print("</div>");
out.print("<div class='form-group'>");
out.print("<label for='password1'>Password</label>");
out.print("<input type='password' class='form-control'
value='"+bean.getPassword()+"' name='password' id='password1'
placeholder='Password'/>");
out.print("</div> ");
out.print("<div class='form-group'>");
out.print("<label for='mobile1'>Mobile Number</label>");
out.print("<input type='number' class='form-control'
value='"+bean.getMobile()+"' name='mobile' id='mobile1' placeholder='Mobile'/>");
out.print("</div>");
out.print("<button type='submit' class='btn btn-primary'>Update</button>");
out.print("</form>");

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("<table class='table table-bordered table-striped'>");

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("<table class='table table-bordered table-striped'>");


out.println("<tr><th>Callno</th><th>Student Id</th><th>Student
Name</th><th>Student Mobile</th><th>Issued Date</th><th>Return Status</th></tr>");
for(IssueBookBean bean:list){

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("<table class='table table-bordered table-striped'>");

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 {

public static Connection getCon() throws Exception {

Connection con = null;


Class.forName("com.mysql.jdbc.Driver");
con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/Elibrary","
root","root");

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.

User Acceptance Testing


User acceptance of a system is the key factor for the success of any system. The system under
consideration is tested for user acceptance by constantly keep the records of applicants and
making changes to the details and password whenever required.
Validation Testing
Validation testing can be defined in many ways,but a simple definition is that the validation
succeeds when the software functions in a manner that can reasonably expected by a
customer.After validation test has been conducted one of the following two possible conditions
exists.The functions or performance characteristics confirm to specification and are accepted.In
the administrator and login modules,all the fields must be filled.In the student
registration,contact number should contain exactly 10 numbers.

NUMBER INPUT GIVEN EXPECTED ACTUAL TEST ACTION


OUTPUT OUTPUT PASS TAKEN

1 robin@gmail.com, Login page Login page yes

abc123

2 simran123@gmail.com, Login page Invalid no Invalid


Username /
kumar Password for Password
login
8.CONCLUSION
The main objective of this document is to illustrate the requirements of the project E-Library
Management system. The document gives the detailed description of the both functional and
non functional requirements proposed by the client. The document is developed after a number
of consultations with the client and considering the complete requirement specifications of the
given Project. The final product of the team will be meeting the requirements of this document.
The primary objective of our research and development was to efficiently manage the library
system. It has been achieved successfully and the system is tested to be working efficiently
Online application of the whole system helps easy access to the system anywhere Online
application of the whole system helps easy access to the system anywhere .As the database is
managed through MySQL, data duplication is eliminated and thereby reducing chances of
error. Also data can be now be easily retrieved, edited and printed whenever required.
Authentication based access proves to be more secure than manual system. Also, database
access is authorized and cannot be viewed or edited by unauthorized personnel. So, this
automated and computerized system is safe, fast and user friendly.
9.FUTURE SCOPE
The proposed system that we are going to develop will be used as the Chief performance system
within the different campuses of the university which interact with the university staff and
students. Therefore, it is expected that the database would perform functionally all the
requirements that are specified by the university.

10.BIBLIOGRAPHY/REFRENCES

1.www.wikipedia.com

Оценить