0% found this document useful (0 votes)
14 views42 pages

Cpe Final

The document presents a project report on the development of an E-Book Store Web Application, aimed at providing a user-friendly platform for browsing, purchasing, and managing e-books. It outlines the project's objectives, methodology, and the technologies used, emphasizing the importance of user experience and secure transactions. The report includes sections on project scope, design, and results, highlighting the collaborative efforts of the students and their guide in completing the project for their diploma in Computer Engineering.

Uploaded by

dahiwalomkar07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views42 pages

Cpe Final

The document presents a project report on the development of an E-Book Store Web Application, aimed at providing a user-friendly platform for browsing, purchasing, and managing e-books. It outlines the project's objectives, methodology, and the technologies used, emphasizing the importance of user experience and secure transactions. The report includes sections on project scope, design, and results, highlighting the collaborative efforts of the students and their guide in completing the project for their diploma in Computer Engineering.

Uploaded by

dahiwalomkar07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

A PROJECT REPORT ON

E-BOOK STORE WEBAPP


SUBMITTED IN PARTIAL FULFILLMENT OF THE
REQUIREMENT FOR AWARD OF
DIPLOMA IN COMPUTER ENGNEERING

SUBMITTED TO
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION
SUBMITTED BY
Sr. No. Student Name Enrollment No.
1 Nilwarn Sumit Dhananjay 2200940109
2 Dahiwal Omkar Suresh 2200940126
3 Jadhav Rohit Ramesh 2200940120
Guided By
MR. R.D.KOKARE
GOVERNMENT POLYTECHNIC JINTUR DISTRICT
PARBHANI, STATE- MAHARASHTRA
Academic Year: 2024-2025

1
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION

Certificate

This is to certify that Mr. NILWARN SUMIT D, ,DAHIWAL OMKAR S,


JADHAV ROHIT ,R .Roll No.C0334,CO341,CO338 of 6th Semester of
Diploma in COMPUTER ENGINEERING of Institute,
GOVERNMENT POLYTECHNIC, JINTUR (0094) has completed the
Final Year Project in Subject- Capstone Project Execution (CPE)
for the academic year 2024-25 as prescribed in the curriculum.

Place: JIINTUR

Project Guide Head of the Department Principal


PROF.R.D.KOKARE PROF.P.B.KALE. DR.S.B.WESSLEY

2
Appendix-B

PROGRESSIVE ASSESSMENT (PA) OF CAPSTONE


PROJECT EXECUTION AND REPORT WRITING
Evaluation Sheet for Internal Assessment

Name of Student: NILWARN SUMIT D, ,DAHIWAL OMKAR S, JADHAV


ROHIT .R.

Name of Program: Computer Engineering Semester: Sixth

Course Title: Capstone Project: Execution and Report Writing


Code:22060

Title of the Capstone Project: E- Book Store Webapp

A. POs addressed by the Capstone Project (Mention only those


predominant POs)

a) Design/Development of Solutions: The design and development of


the E-Book Store Webapp involves several stages, ranging from
user interface design to backend development and deployment.
b) Modern Tool Usage: Intellij Idea , Tomcat Software, workbench
Database,
c) Individual and Team Work: Work independently and
collaboratively to design, develop, and test the application.
d) Project Management and Finance: Plan project timelines, allocate
resources, and manage development efficiently.

B. COs addressed by the Capstone Project (Mention only those


predominant Pos)

a) Implement the planned activity individually and/or as team.


b) Select, collect and use required information/knowledge to solve
the identified problem.

3
c) Take appropriate decisions based on collected and analyzed
information.
d) Ensure quality in product.
h) Communicate effectively and confidently as a member and
leader of team.

C. OTHER LEARNING OUTCOMES ACHIEVED THROUGH


THIS PROJECT

a) Innovation and Creativity: Encourage innovative thinking and creativity in


designing unique game concepts and mechanics.
b) Adaptability: Develop the ability to adapt to new tools, technologies, and
methodologies in web development.
c) Critical Thinking: Enhance problem-solving skills by addressing challenges
encountered during the development process.
d) User-Centric Design: Emphasize the importance of designing with the end-
user in mind, focusing on usability and user experience.

1. unit Outcomes (Cognitive Domain)


a) Understanding Web Development Concepts
b) Analyzing User Requirements
c) Problem-Solving and Debugging
d) Webapp Optimization
e) Integration of E-Book Store

2. Practical Outcomes (in Psychomotor Domain)


a) User Interface (UI) Design – Develop user-friendly and intuitive interfaces for
the E-Book Store Webapp using HTML, CSS, and JavaScript. Create interactive
elements such as book cards, category filters, and product detail pages to enhance
the browsing experience.

b) E-Commerce Logic Implementation – Write backend code (using Node.js,


Express, or Django) to handle various e-commerce features, such as user
authentication, product catalog management, shopping cart functionality, and order
processing.

4
c) Application Deployment – Compile, debug, and test the E-Book Store Webapp
on different devices and web browsers. Ensure that the application is responsive,
optimized, and free of bugs, providing a smooth experience across desktop and
mobile platforms.

d) Version Control Usage – Use Git and GitHub (or similar version control tools)
to manage the project’s source code, track changes, and collaborate with team
members on updates and new features for the webapp.

3. Affective Domain Outcomes

a) Collaboration and Teamwork – Work efficiently in a team environment, assigning and


managing tasks among team members.
b) Communication Skills – Present project ideas, write documentation, and explain technical
concepts effectively.
c) Time Management – Plan and execute the project within given deadlines while managing
multiple game development tasks.
d) Adaptability and Continuous Learning – Stay updated with new web development tools
and best practices in Databse and Intellij software .

5
ACKNOWLEDGEMENT

The entire session of final project completion was a great experience, providing us
a great insight and innovation into learning various software engineering concepts
and benefits of teamwork. As is rightly said, for the successful completion of any
software project, people are the most important asset. Our project would not be
materialized without the cooperation of many of the people involved.
First and foremost, we are very much thankful to our respected project
guide PROF. R.D.KOKARE SIR For his leading guidance and sincere efforts in
finalizing this topic .he took a deep interest in correcting the minor problems and
guided us through whole project. Also he has been persistent source of inspiration
for us.
We are also very thankful to our H.O.D. PROF.P.B.KALE SIR for the
systematic guidance and providing necessary facilities and we express our deep
gratitude to all the staff members and our department’s technical staff for providing
us needed help.
Finally we express our thanks to our PRINCIPAL. S.WESSLEY. SIR , parents
and friends, who always encouraged us whenever afraid of failing. You all have
always helped keep our feet planted firmly on the ground; with you all we are truly
blessed.

NAMES OF STUDENTS:

1) Nilwarn Sumit Dhananjay


2) Dahiwal Omkar Suresh
3) Jadhav Rohit Ramesh

6
ABSTRACT

The E-BOOK STORE project that aims to design and develop an online book store
management web application. The main objective of this project is to provide an
efficient and reliable platform for customers to search, purchase, and manage
books online. The system will allow customers to browse through various
categories of books, view book details, add books to the shopping cart, make
payments, and review books. The application will also provide features for
administrators to manage books, vendors, and orders.

Overview of Online E- Book Store Application:


The online book store application enables customers to purchase books online,
vendors to set up online book stores, and system administrators to approve and
reject requests for new books and maintain lists of book categories.
Objectives:
The main objective of "Online Book Store" is to provide an essence of online book store
via a simple and yet powerful medium.
The project has been designed to simulate the working of an actual online book store.

Functional Requirements:

1.Browse Books: An user logging into the site can browse through the books both by
category or in a random manner.
2.View Details: An user can also view the details of the books (e.g., price, author, title).
Add to cart: The user can add the books of his choice to the shopping cart.
3.Make payments: The user ultimately visits his cart and makes the payments.
Review for Books: Users can give reviews for books.

Keywords: Reviews Books , Pick Your Categories, Browse Books, View Details, Checkout Cart.

7
Content page
Sr. No. Name of topic Page No.

1 Title Page 1

2 Certificate 3

3 Acknowledgement 6

4 Abstract 7

5 Content page 8

6 Chapter-1 Introduction 9

7 Chapter-2 Literature survey 10-11

8 Chapter-3 Scope of the project 12

9 Chapter-4 Methodology 13

10 Chapter-5 details of designs, working and 14


processes
11 Chapter -6 Results and Application 15-35

12 Outputs 35-41

13 Conclusion and Reference 42-43

8
Chapter 1:
INTRODUCTION
The digital transformation of the book industry has revolutionized how people
consume literature and educational materials. E-books, in particular, have emerged as
a highly convenient and accessible way for readers to access a wide variety of
content. An E-Book Store WebApp aims to provide a seamless platform for users to
browse, purchase, and download e-books across multiple genres, including fiction,
non-fiction, educational, and more. The goal of this capstone project is to design and
develop a fully functional and user-friendly web application that not only facilitates
e-book transactions but also offers additional features like book recommendations,
user reviews, and integration with multiple payment systems.
This project will focus on delivering an intuitive, responsive, and secure e-book store
that enhances the reading experience by leveraging the power of modern web
technologies. It will enable users to:
1. Browse a Wide Range of E-Books: Users can explore a large catalog of books,
sorted by genre, popularity, or recent releases.
2. Make Secure Purchases: The platform will feature integration with reliable
payment gateways for easy and secure transactions.
3. Download and Read Books: After purchasing, users can easily download e-
books in multiple formats compatible with various devices and reading
platforms.
4. Book Recommendations and Reviews: Personalized recommendations based
on user preferences and ratings, as well as user-generated reviews to help other
buyers make informed decisions.
5. Account Management: Users can create accounts to track purchase history,
manage downloaded content, and customize their reading preferences.

9
Chapter 2:
LITERATURE SURVEY
An E-Book Store Web Application involves reviewing and
summarizing existing research, technologies, and trends in the domain of
e-book stores, digital content distribution, and web app development.
This can include studies on user preferences, security features, payment
integration, data management, and the latest trends in e-commerce and
web app design.

Existing Systems: Currently, many mobile applications focus on


individual games like Tic-Tac-Toe, Chess, or Snake Game. While these
apps offer quality gameplay, they lack variety, forcing users to install
multiple applications to enjoy different games.

Problem Identification:
From the insights gathered, several core problems can be identified
that the proposed E-Book Store WebApp seeks to solve:
1. Limited Personalization: Most platforms offer limited or
generic recommendations, making it harder for users to find
books that match their unique tastes and preferences.
2. Device Compatibility Issues: Proprietary formats (such as
AZW) restrict cross-platform and cross-device usage, creating
friction for users who want to access their books on multiple
devices.
3. Complicated User Interfaces: Many e-book platforms are
difficult to navigate, particularly for new users or those
unfamiliar with digital books. A streamlined, user-friendly

10
interface is essential to ensure that users can quickly browse
and make purchases.
4. Limited Payment Methods: A lack of support for diverse
payment options, especially in international markets, reduces
the accessibility and inclusivity of existing platforms.
5. Discovery Challenges: Despite large book catalogs, many
platforms struggle with discoverability. Effective search tools,
personalized recommendations, and advanced filtering options
are essential for helping users find books that align with their
interests.

Problem Statement: The E-BOOK STORE project that aims to design


and develop an online book store management web application. The
main objective of this project is to provide an efficient and reliable
platform for customers to search, purchase, and manage books online.

11
Chapter 3:
Scope of the Project

The primary objective of the E-Book Store Webapp is to provide users


with a platform to browse, purchase, and download digital e-books. The
platform aims to offer a seamless and user-friendly experience for
readers and publishers while addressing the needs of both.
• Online shopping web sites for retail sales direct to consumers.

• Providing or participation in online marketplaces, which process third-


party business-to-consumers or consumers-to-consumers sales.

• Business-to-business buying and selling.

• Gathering and using demographic data through web contacts and


social media.

• Business-to-business electronic data interchange.

• Marketing to prospective and established customers by e-mail or fax


(for example, with newsletters).

• Engaging in partial for launching new products and services.

12
Chapter 4:
Methodology
The development process follows the Agile methodology, which
allows continuous improvements and feedback integration. The
steps include:
1. Requirement Analysis: Identifying key features and user
needs.
2. Design Phase: Creating Frontend for E-Book store
webapp.
3. Development Phase: Coding the Webapp for E-Book store
using Java and designing the interface using html and Css.
4. Testing Phase: Conducting unit testing, UI testing, and
gathering user feedback.
5. Deployment Phase: Releasing the application for Android
users.
6. Maintenance & Updates: Fixing bugs, improving
performance, and adding new features over time.

13
Chapter 5:
Details of Design, Working, and Processes
1. User Interface Design:

1. Home Page: The landing page of the e-book store displays a clean, visually appealing
layout with sections for featured e-books, new arrivals, bestsellers, and promotional
offers. A prominent search bar at the top allows users to quickly find specific e-books by
title, author, or genre.
2. Category and Genre Pages: Separate pages for various genres (e.g., Fiction, Non-
fiction, Science, Romance) are designed to make browsing easy. Each category page
contains filters such as price range, ratings, and publication date, enabling users to refine
their search and find the perfect e-book.
3. Product Detail Pages: Each e-book has its own product page with essential information,
including the title, author

2.Webapp Mechanics:

o User Authentication: User can login on website of e-book.


o E-book Browsing: The e-book store showcases a wide variety of books across
different categories, such as Fiction, Non-fiction, Mystery, Romance, and more.
o Shopping Cart and Checkout: Users can add e-books to their
shopping cart, review selected books.
o Order Confirmation and Download: Increasing difficulty
levels with progressive speed.
o Brick Breaker: Multiple levels with different challenges.
o Rock-Paper-Scissors: AI-based opponent for single-player
mode.

3.Technology Stack:

o Programming Language: Java


o UI Development: CSS
o Backend (optional): (Sql) Workbench,
Java,Tomcat.springboot
o Development Environment: Intellij Idea

14
Chapter 6:
Results and Applications
• The Web application successfully integrates multiple Books into
as Multiple platform.
• Users can Purchase the Books from Store.
• A smooth UI enhances the User experience.
• The Web app can be used for Purchasing books, Oredring books
etc..

Program:
JSP:
Add-Books.JSP:
<%--
Document : add_books
Created on : Mar 9, 2022, 12:12:25 AM
Author : MeGa
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page isELIgnored="false" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Add Book Page - E-Book</title>
<%@include file="all_css.jsp" %>
</head>
<body style="background-color: #f0f1f2">
<%@include file="navbar.jsp" %>
<c:if test="${empty userobj}">
<c:redirect url="../login.jsp" />
</c:if>
<h3 class="text-center">Hello, Admin</h3>
<div class="container mt-3">

15
<div class="row">
<div class="col-md-6 offset-md-3">
<div class="card">
<div class="card-body">
<c:if test="${not empty succMsg}">
<div class="container text-center">
<div class="alert alert-success" role="alert">
${succMsg}
</div>
</div>
<c:remove var="succMsg" />
</c:if>
<c:if test="${not empty failedMsg}">
<div class="container text-center">
<div class="alert alert-danger" role="alert">
${failedMsg}
</div>
</div>
<c:remove var="failedMsg" />
</c:if>
<h3 class="text-center">Add Books</h3>
<form action="../add_book" method="post" enctype="multipart/form-data">
<div class="form-group">
<label>Book Name *</label>
<input type="text" name="bookName" class="form-control" aria-
describedby="emailHelp" required>
</div>

<div class="form-group">
<label>Author Name *</label>
<input type="text" name="authorName" class="form-control" aria-
describedby="emailHelp" required>
</div>

<div class="form-group">
<label>Book Price *</label>
<input type="number" name="bookPrice" class="form-control" aria-
describedby="emailHelp" required>
</div>
<div class="form-group">
<label>Book Category *</label>
<select id="category" class="form-control" name="bCategory" required>
<option selected disabled>--- Select ---</option>
<option value="New">New Book</option>
</select>

16
</div>
<div class="form-group">
<label>Book Status *</label>
<select id="status" class="form-control" name="bStatus" required>
<option selected disabled>--- Select ---</option>
<option value="Active">Active</option>
<option value="Inactive">Inactive</option>
</select>
</div>
<div class="form-group">
<label>Upload Image</label>
<input type="file" name="bImage" class="form-control" required>
</div>
<button type="submit" class="btn btn-primary badge-pill btn-block">Add Book</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div style="margin-top: 20px;">
<%@include file="footer.jsp" %>
</div>
</body>
</html>

Home.JSP:
<%--
Document : Home
Created on : Mar 8, 2022, 10:56:51 PM
Author : MeGa
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page isELIgnored="false" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Admin User Page - E-Books</title>

17
<%@include file="all_css.jsp" %>

<style>
a{
text-decoration: none;
color: black;
}
a:hover{
text-decoration: none;

}
.crd-ho:hover{
background-color: #f0f1f2;
}

</style>
</head>
<body style="background-color: #f0f1f2">
<%@include file="navbar.jsp" %>
<c:if test="${empty userobj}">
<c:redirect url="../login.jsp" />
</c:if>
<div class="container mt-3">
<h1 class="text-center">Hello,Admin</h1>
<div class="row p-5">

<div class="col-md-3">
<a href="add_books.jsp">
<div class="card crd-ho" style="height: 180px;">
<div class="card-body text-center">
<br>
<i class="fas fa-plus-square fa-3x text-
primary"></i>
<h4>Add Books</h4>
-----------------
</div>
</div>
</a>
</div>

<div class="col-md-3">
<a href="all_books.jsp">
<div class="card crd-ho" style="height: 180px;">
<div class="card-body text-center">
<br>

18
<i class="fa-solid fa-book-open fa-3x text-
danger"></i>
<h4>All Books</h4>
-----------------
</div>
</div>
</a>
</div>

<div class="col-md-3">
<a href="orders.jsp">
<div class="card crd-ho" style="height: 180px;">
<div class="card-body text-center">
<br>
<i class="fas fa-box-open fa-3x text-
warning"></i>
<h4>Orders</h4>
-----------------
</div>
</div>
</a>
</div>

<div class="col-md-3">
<a data-toggle="modal" data-target="#exampleModalCenter" >
<div class="card crd-ho" style="height: 180px;">
<div class="card-body text-center">
<br>
<i class="fa-solid fa-right-to-bracket fa-3x
text-primary"></i>
<h4>Logout</h4>
-----------------
</div>
</div>
</a>
</div>
</div>
</div>
<!--logout model-->
<!-- Button trigger modal -->

<!-- Modal -->


<div class="modal fade" id="exampleModalCenter" tabindex="-1"
role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">

19
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">E-
Books Management System</h5>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="text-center">
<h4>Do you want logout?</h4>
<button type="button" class="btn btn-secondary" data-
dismiss="modal">No</button>
<a href="../logout" class="btn btn-primary text-
white">Yes</a>
</div>
</div>
<div class="modal-footer">

</div>
</div>
</div>
</div>
<!--end of logout model-->
<div style="margin-top: 100px;">
<%@include file="footer.jsp" %>
</div>

</body>
</html>

NavBars.JSP:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page isELIgnored="false" %>
<div class="container-fluid" style="height: 10px; background-color: #303f9f">

</div>
<div class="container-fluid p-3 btn-light">
<div class="row">
<div class="col-md-3 text-success">
<h3><i class="fa-solid fa-book"></i> E-Book Store</h3>
</div>
<div class="col-md-6">

20
</div>
<div class="col-md-3">
<c:if test="${not empty userobj}">
<a href="#" class="btn btn-success"><i class="fas fa-user"></i>
${userobj.name}</a>
<a data-toggle="modal" data-target="#exampleModalCenter"
class="btn btn-primary text-white"><i class="fa-solid fa-right-to-bracket"></i>
Logout</a>
</c:if>
<c:if test="${empty userobj}">
<a href="../login.jsp" class="btn btn-success"><i class="fa-solid
fa-right-to-bracket"></i> Login</a>
<a href="../register.jsp" class="btn btn-primary text-white"><i
class="fa-solid fa-user-plus"></i> Register</a>
</c:if>

</div>
</div>
</div>
<!--logout model-->
<!-- Button trigger modal -->

<!-- Modal -->


<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-
labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">E-Books
Management System</h5>
<button type="button" class="close" data-dismiss="modal" aria-
label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="text-center">
<h4>Do you want logout?</h4>
<button type="button" class="btn btn-secondary" data-
dismiss="modal">No</button>
<a href="../logout" class="btn btn-primary text-
white">Yes</a>
</div>
</div>

21
<div class="modal-footer">

</div>
</div>
</div>
</div>
<!--end of logout model-->
<nav class="navbar navbar-expand-lg navbar-dark bg-custom">
<a class="navbar-brand" href="Home.jsp"><i class="fa-solid fa-house"></i></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-
target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-
expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">


<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="Home.jsp">Home <span class="sr-
only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="contact.jsp"><i class="fa-solid
fa-circle-phone"></i> Contact Us</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="about.jsp"><i class="fa-solid
fa-circle-phone"></i> About Us</a>
</li>
</ul>
</div>
</nav>

Order Page:
<%--
Document : show_single_order
Created on : Mar 13, 2022, 10:28:36 PM
Author : MeGa
--%>
<%@page import="com.model.BookOrder"%>
<%@page import="com.connection.DBConnection"%>
<%@page import="com.daoImpl.BookOrderDaoImpl"%>
<%@page import="com.dao.BookOrderDao"%>

22
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page isELIgnored="false" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Show Single Order Page - EBook</title>
<%@include file="all_css.jsp" %>
</head>
<body style="background-color: #f0f1f2">

<%@include file="navbar.jsp" %>


<c:if test="${empty userobj}">
<c:redirect url="../login.jsp" />
</c:if>
<div class="container">
<%
String orderId = request.getParameter("orderId");
BookOrderDao bookOrderDao = new
BookOrderDaoImpl(DBConnection.getConnection());
BookOrder b = bookOrderDao.getBookByOrderId(orderId);
%>
<div class="row">
<div class="col-md-12">
<div class="text-center text-success mt-3">
<i class="fa-solid fa-eye fa-3x"></i>
<h1>View Order</h1>
</div>
<div class="card mt-2">
<div class="card-body">
<div class="text-center text-primary">
<i class="fa-solid fa-eye fa-2x"></i>
</div>
<br>
<div class="form-row">
<div class="form-group col-md-3">
<input type="text" class="form-control form-
control-sm" value="Order ID: <%= b.getOrderId() %>" readonly>
</div>
<div class="form-group col-md-3">
<input type="text" class="form-control form-
control-sm" value="Book Name: <%= b.getBookName()%>" readonly>
</div>
<div class="form-group col-md-3">

23
<input type="text" class="form-control form-
control-sm" value="Author: <%= b.getAuthorName() %>" readonly>
</div>
<div class="form-group col-md-3">
<input type="text" class="form-control form-
control-sm" value="Book Price: &#8360;. <%= b.getPrice()%>" readonly>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
<input type="text" class="form-control form-
control-sm" value="Username: <%= b.getUserName() %>" readonly>
</div>
<div class="form-group col-md-3">
<input type="text" class="form-control form-
control-sm" value="Email: <%= b.getEmail() %>" readonly>
</div>
<div class="form-group col-md-3">
<input type="text" class="form-control form-
control-sm" value="Phone Number: <%= b.getPhoneNumber()%>" readonly>
</div>
<div class="form-group col-md-3">
<input type="text" class="form-control form-
control-sm" value="Payment Type: <%= b.getPaymentType()%>" readonly>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<input type="text" class="form-control form-
control-sm" value="User Address: <%= b.getFullAddress()%>" readonly>
</div>

</div>
<div class="form-row">

<div class="form-group col-md-3">


<input type="text" class="form-control form-
control-sm" value="Order Date: <%= b.getOrderTime() %>" readonly>
</div>
</div>
<div class="text-center">
<a href="Home.jsp" class="btn btn-sm bg-success
text-white">Back To Home</a>
</div>
</div>

24
</div>

</div>
</div>
</div>
<%@include file="footer.jsp" %>
</body>
</html>

ViewBookDetails.JSP:
<%--
Document : view_book_details
Created on : Mar 11, 2022, 4:57:53 PM
Author : MeGa
--%>

<%@page import="com.model.Books"%>
<%@page import="com.connection.DBConnection"%>
<%@page import="com.daoImpl.BookDaoImpl"%>
<%@page import="com.dao.BookDao"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>View Book Details Page - EBook</title>
<%@include file="all_component/all_css.jsp" %>
</head>
<body style="background: #f0f1f2">
<%@include file="all_component/navbar.jsp" %>

<%
Integer id = Integer.parseInt(request.getParameter("id"));
BookDao bookDao = new BookDaoImpl(DBConnection.getConnection());
Books b = bookDao.getBookById(id);
%>
<div class="container p-3">
<div class="row">
<div class="col-md-6 text-center p-5 border bg-white">
<img src="book/<%= b.getPhotoName()%>" style="width: 150px;
height: 150px;" />
<h4 class="mt-2">Book Name: <span class="text-success"><%=
b.getBookName()%></span></h4>

25
<h4>Author Name: <span class="text-success"><%=
b.getAuthor()%></span></h4>
<h4>Category: <span class="text-success"><%=
b.getBookCategory()%></span></h4>
</div>
<div class="col-md-6 text-center p-5 border bg-white">
<h4><%= b.getBookName()%></h4>
<%
if ("Old".equals(b.getBookCategory())) {
%>
<h5 class="text-primary">Contact to Seller</h5>
<h5 class="text-primary">
<i class="far fa-envelope"></i>
Email: <%= b.getEmail()%>
</h5>
<%
} else {
%>
<h5 class="text-primary">Contact to Admin</h5>
<h5 class="text-primary">
<i class="far fa-envelope"></i>
Email: <%= b.getEmail()%>
</h5>
<%
}
%>
<div class="row">
<div class="col-md-4 text-danger text-center p-2">
<i class="fas fa-money-bill-wave fa-3x"></i>
<p><b>Cash on Delivery</b></p>
</div>
<div class="col-md-4 text-danger text-center p-2">
<i class="fas fa-undo-alt fa-3x"></i>
<p><b>Return Available</b></p>
</div>
<div class="col-md-4 text-danger text-center p-2">
<i class="fas fa-truck-moving fa-3x"></i>
<p><b>Free Shipping</b></p>
</div>
</div>
<%
if ("Old".equals(b.getBookCategory())) {
%>
<div class="text-center p-3">

26
<a href="index.jsp" class="btn btn-success"><i class="fa-
solid fa-cart-plus"></i> Continue Shopping</a>
<button class="btn btn-danger">&#8360;. <%=
b.getPrice()%></button>
</div>
<%
} else {
%>

<div class="text-center p-3">


<a href="#" class="btn btn-primary"><i class="fa-solid
fa-cart-plus"></i> Add Cart</a>
<button href="#" class="btn btn-danger">&#8360;. <%=
b.getPrice()%></button>
</div>
<%
}
%>

</div>
</div>
</div>
<div style="margin-top: 45px;">
<%@include file="all_component/footer.jsp" %>
</div>

</body>
</html>

Maven (Pom.xml file)


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.ebook</groupId>
<artifactId>EBook</artifactId>
<version>1</version>
<packaging>war</packaging>

<name>EBook</name>

27
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/jstl/jstl -->
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.25</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>

28
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>7.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>

base.html
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Game Hub</title>

29
<link href="https://cdn.jsdelivr.net/npm/[email protected]
alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-
[email protected]/font/bootstrap-icons.css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css')
}}">
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js
"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="{{ url_for('dashboard') }}">Game
Hub</a>
{% if current_user.is_authenticated %}
<div class="navbar-nav ms-auto">
<span class="nav-item nav-link">Welcome, {{ current_user.username
}}</span>
<a class="nav-item nav-link" href="{{ url_for('logout')
}}">Logout</a>
</div>
{% endif %}
</div>
</nav>

<div class="container mt-4">


{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-info">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}

{% block content %}{% endblock %}


</div>

</body>
</html>
</body>
</html>

Cart.html

30
{% extends "base.html" %}

{% block content %}
<div class="row">
<div class="col-12 text-center mb-4">
<h2>Welcome to Game Hub</h2>
<p>Select Your Favorite Game</p>
</div>
</div>

<div class="row justify-content-center">


<div class="col-md-4 mb-4">
<div class="card">
<div class="card-body text-center">
<h5 class="card-title">Chess</h5>
<p class="card-text">High Score: {{ scores.get('chess', 0) }}</p>
<a href="{{ url_for('chess') }}" class="btn btn-primary">Play</a>
</div>
</div>
</div>

<div class="col-md-4 mb-4">


<div class="card">
<div class="card-body text-center">
<h5 class="card-title">Tic-Tac-Toe</h5>
<p class="card-text">High Score: {{ scores.get('tictactoe', 0)
}}</p>
<a href="{{ url_for('tictactoe') }}" class="btn btn-
primary">Play</a>
</div>
</div>
</div>

<div class="col-md-4 mb-4">


<div class="card">
<div class="card-body text-center">
<h5 class="card-title">Snake</h5>
<p class="card-text">High Score: {{ scores.get('snake', 0) }}</p>
<a href="{{ url_for('snake') }}" class="btn btn-primary">Play</a>
</div>
</div>
</div>

<div class="col-md-4 mb-4">


<div class="card">

31
<div class="card-body text-center">
<h5 class="card-title">Rock Paper Scissors</h5>
<p class="card-text">High Score: {{
scores.get('rockpaperscissors', 0) }}</p>
<a href="{{ url_for('rockpaperscissors') }}" class="btn btn-
primary">Play</a>
</div>
</div>
</div>
<div class="col-md-4 mb-4">
<div class="card">
<div class="card-body text-center">
<h5 class="card-title">Ludo</h5>
<p class="card-text">High Score: {{ scores.get('ludo', 0) }}</p>
<a href="{{ url_for('ludo') }}" class="btn btn-primary">Play</a>
</div>
</div>
</div>
<div class="col-md-4 mb-4">
<div class="card">
<div class="card-body text-center">
<h5 class="card-title">Brick Breaker</h5>
<p class="card-text">High Score: {{ scores.get('brickbreaker', 0)
}}</p>
<a href="{{ url_for('brickbreaker') }}" class="btn btn-
primary">Play</a>
</div>
</div>
</div>
</div>
{% endblock %}

login.html
{% extends "base.html" %}

{% block content %}
<div class="row justify-content-center">
<div class="col-md-6">
<div class="card">
<div class="card-header">
<h2 class="text-center">Log in</h2>
</div>
<div class="card-body">
<form method="POST" action="{{ url_for('login') }}">

32
{{ form.hidden_tag() }}
<div class="mb-3">
{{ form.username.label(class="form-label") }}
{{ form.username(class="form-control") }}
</div>
<div class="mb-3">
{{ form.password.label(class="form-label") }}
<div class="input-group">
{{ form.password(class="form-control") }}
<button class="btn btn-outline-secondary"
type="button" onclick="togglePassword('{{ form.password.id }}')">
<i class="bi bi-eye"></i>
</button>
</div>
</div>
{{ form.submit(class="btn btn-primary w-100", value="Log in")
}}
</form>
<div class="mt-3 text-center">
<p>Don't have an account? <a href="{{ url_for('register')
}}">Sign up here</a></p>
</div>
</div>
</div>
</div>
</div>

<script>
function togglePassword(fieldId) {
const passwordField = document.getElementById(fieldId);
const button = event.currentTarget;
const icon = button.querySelector('i');

if (passwordField.type === 'password') {


passwordField.type = 'text';
icon.classList.remove('bi-eye');
icon.classList.add('bi-eye-slash');
} else {
passwordField.type = 'password';
icon.classList.remove('bi-eye-slash');
icon.classList.add('bi-eye');
}
}
</script>
{% endblock %}

33
register.html
{% extends "base.html" %}

{% block content %}
<div class="row justify-content-center">
<div class="col-md-6">
<div class="card">
<div class="card-header">
<h2 class="text-center">Sign up</h2>
</div>
<div class="card-body">
<form method="POST" action="{{ url_for('register') }}">
{{ form.hidden_tag() }}
<div class="mb-3">
{{ form.username.label(class="form-label") }}
{{ form.username(class="form-control") }}
</div>
<div class="mb-3">
{{ form.password.label(class="form-label") }}
<div class="input-group">
{{ form.password(class="form-control") }}
<button class="btn btn-outline-secondary"
type="button" onclick="togglePassword('{{ form.password.id }}')">
<i class="bi bi-eye"></i>
</button>
</div>
</div>
{{ form.submit(class="btn btn-primary w-100", value="Sign
up") }}
</form>
<div class="mt-3 text-center">
<p>Already have an account? <a href="{{ url_for('login')
}}">Log in here</a></p>
</div>
</div>
</div>
</div>
</div>

<script>
function togglePassword(fieldId) {
const passwordField = document.getElementById(fieldId);
const button = event.currentTarget;
const icon = button.querySelector('i');

34
if (passwordField.type === 'password') {
passwordField.type = 'text';
icon.classList.remove('bi-eye');
icon.classList.add('bi-eye-slash');
} else {
passwordField.type = 'password';
icon.classList.remove('bi-eye-slash');
icon.classList.add('bi-eye');
}
}
</script>
{% endblock %}
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField
from wtforms.validators import DataRequired, Length

class LoginForm(FlaskForm):
username = StringField('Username', validators=[DataRequired(), Length(min=3,
max=20)])
password = PasswordField('Password', validators=[DataRequired()])
submit = SubmitField('Log in')

class RegisterForm(FlaskForm):
username = StringField('Username', validators=[DataRequired(), Length(min=3,
max=20)])
password = PasswordField('Password', validators=[DataRequired(),
Length(min=6)])
submit = SubmitField('Sign up')

class Score:
def __init__(self, user_id, game, score):
self.user_id = user_id
self.game = game
self.score = score

# Initialize scores with the new game


scores = {
1: {'tictactoe': 0, 'snake': 0, 'rockpaperscissors': 0, 'chess': 0, 'ludo':
0, 'brickbreaker': 0}
}

35
Output:

36
37
38
39
40
Chapter 7:
Conclusion and Future Scope
The E-Book Store Webapp provides a robust platform for users to
easily browse, purchase, and download e-books in a seamless and secure
manner. With its user-friendly interface, personalized recommendations,
and integrated payment gateways, the platform offers an excellent e-
commerce experience. The webapp also ensures data security through
encryption and optional two-factor authentication, protecting users'
personal and financial information. Instant access to e-books in multiple
formats allows for a flexible reading.

41
References:
• IntelliJ IDEA:

• Official Website: https://www.jetbrains.com/idea/


• Download page: https://www.jetbrains.com/idea/download/
• Documentation: https://www.jetbrains.com/idea/documentation/

• Tomcat:

• Official Website: https://tomcat.apache.org/


• Download page: https://tomcat.apache.org/download-90.cgi
• Documentation: https://tomcat.apache.org/tomcat-9.0-doc/

• Workbench SQL (MySQL Workbench):

• Official Website: https://www.mysql.com/products/workbench/


• Download page: https://dev.mysql.com/downloads/workbench/
• Documentation: https://dev.mysql.com/doc/workbench/en/

42

You might also like