E commerce

1,133 views 184 slides Aug 06, 2020
Slide 1
Slide 1 of 202
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108
Slide 109
109
Slide 110
110
Slide 111
111
Slide 112
112
Slide 113
113
Slide 114
114
Slide 115
115
Slide 116
116
Slide 117
117
Slide 118
118
Slide 119
119
Slide 120
120
Slide 121
121
Slide 122
122
Slide 123
123
Slide 124
124
Slide 125
125
Slide 126
126
Slide 127
127
Slide 128
128
Slide 129
129
Slide 130
130
Slide 131
131
Slide 132
132
Slide 133
133
Slide 134
134
Slide 135
135
Slide 136
136
Slide 137
137
Slide 138
138
Slide 139
139
Slide 140
140
Slide 141
141
Slide 142
142
Slide 143
143
Slide 144
144
Slide 145
145
Slide 146
146
Slide 147
147
Slide 148
148
Slide 149
149
Slide 150
150
Slide 151
151
Slide 152
152
Slide 153
153
Slide 154
154
Slide 155
155
Slide 156
156
Slide 157
157
Slide 158
158
Slide 159
159
Slide 160
160
Slide 161
161
Slide 162
162
Slide 163
163
Slide 164
164
Slide 165
165
Slide 166
166
Slide 167
167
Slide 168
168
Slide 169
169
Slide 170
170
Slide 171
171
Slide 172
172
Slide 173
173
Slide 174
174
Slide 175
175
Slide 176
176
Slide 177
177
Slide 178
178
Slide 179
179
Slide 180
180
Slide 181
181
Slide 182
182
Slide 183
183
Slide 184
184
Slide 185
185
Slide 186
186
Slide 187
187
Slide 188
188
Slide 189
189
Slide 190
190
Slide 191
191
Slide 192
192
Slide 193
193
Slide 194
194
Slide 195
195
Slide 196
196
Slide 197
197
Slide 198
198
Slide 199
199
Slide 200
200
Slide 201
201
Slide 202
202

About This Presentation

E commerce Website Project


Slide Content

PROJECT REPORT
On
E-COMMERCE WEBSITE
Submitted in Partial Fulfillment of the
Requirements for the Award of the degree
Submitted by:
Priyanshu Joshi (S160022100505)
Nitin Negi (S150022100164)
Lakhan Singh Rautella (S150022100527)
Tanuj Singh (S150022100307)

Under The Guidance of

Mrs. Nisha Mam

NIIT

2 | P a g e

[Janakpuri, New Delhi]


CONTENT
Chapter Page No.

Certificate 4.

Declaration 5.

Acknowledgement 6.

Abstract 7.

List of Figures 8.
 Basic AIM
 Client Side Programming
 Server Side Programming
 How It Works
 How Do We Get Idea?

Hardware and Software Requirements Specification 9.
 Web Server
 Web Browser
 Server Software
 TCP/IP Address
 Ports and Protocols Web Authorizing Tools
 Database System
 Programming Languages
 Browser and Platform Capabilities

System Design (UML and Use Cases) 13.
 Use-case diagram 14
 Activity diagram 15
 Class diagram 16

3 | P a g e

 DFD 17-19

Database Tables 20-21

Screenshots 22-29
Coding 30
 User pages 31-125
 Admin pages 126-170
 Java Beans 171-181
 DAO 182-199


Result 200

Future Scope and Conclusion & References 201

4 | P a g e


CERTIFICATE
This to certify that the project report entitled “E-Commerce Website” which has
been submitted by [ Priyanshu Joshi (S160022100505), Nitin Negi
(S150022100164), Lakhan Singh Rautella (S150022100527) and Tanuj Singh
(S150022100307)] in the partial fulfillment of the requirements for the award of the
degree, from NIIT, New Delhi is an authentic record of the group’s own work carried
out by them under my guidance. The matter embodied on this thesis is original and
has not been submitted for the award of any other degree.



Date: Mrs. Nisha
Tech Mentor
NIIT
Janakpuri

5 | P a g e




DECLARATION


We hereby declare that all the work presented in the documentation entitled “E-
Commerce Website” in the partial fulfillment of the requirement for the award of
degree Software Engineering from NIIT in an authentic record of our own work
carried.



Date:


Priyanshu Joshi
(160022100505)
Nitin Negi
(S150022100164)
Lakhan Singh Rautella
(S150022100527)

6 | P a g e

Tanuj Singh
(S150022100307)








ACKNOWLEDGEMENT



We would like to express our gratitude towards our supervisor and our Teachers in
NIIT-Janakpuri, Mrs. Nisha who has given us support and suggestions. Without her
help we could not have presented this dissertation up to the present standard. We
also take this opportunity to thank all others who gave us support for the project and
in other aspects of our study at NIIT .

Date:



Priyanshu Joshi
(160022100505)
Nitin Negi
(S150022100164)

7 | P a g e

Lakhan Singh Rautella
(S150022100527)
Tanuj Singh
(S150022100307)




ABSTRACT


Online shopping has been known as a rapidly growing business, and although online
grocery shopping has not followed these same growth patterns in the past, it is now
being recognized for its potential. As such, the focus of previous online shopping
research has seldom encompassed this specific retail market, with the existing
studies focusing essentially on consumer’s motivations and attitudes, rather than
how consumers actually groceries online. Therefore, this dissertation has the
objective of uncovering some of the details which can help further both academic
research and managerial knowledge. The general consumer decision making
process is characterized by a pre-decisional a decisional and a post-decisional
phase. All of which were addressed in an exploratory fashion, through a mixed
methods strategy which combined both quantitative and qualitative methods of data
collection. One of the main results obtained through this study is complimentarily of
retail channels – as it was found that online grocery shopping serves essentially for
major shopping trips, being complimented with smaller trips to traditional stores.
Moreover, some resistance to online grocery shopping, specifically the shopping
of fresh produce, was also still found among the Portuguese population. Additionally,
based on two of the main consumer shopping orientations which shape online
grocery shopping. Price-sensitivity and convenience, this study uncovered consumer
groups which presented distinguishable shopping strategies. These strategies are in
general very focused and rational, and very essentially based on the shopper’s more

8 | P a g e

prominent shopping orientation. Moreover, all consumer types were found to have
general negative response to online stimuli present during shopping. Thus, this
dissertation contributed to the knowledge of consumer decision making process for
online grocery shopping, making wave for new and further researches in this field
and contributing to managerial knowledge.


INTRODUCTION

Basic Aim:
Complete online solution for SEO and SMO techniques for making websites popular
and get higher ranking on search engines.
Tailor made design with value added features for gaining and retaining customers on
the site.
Unlimited changes without functional difficulties for addressing ever-changing
business requirements
Safe and secure payment options and mechanism for generating trust among
customers and building up their confidence for the particular site.
Technical assistance for any difficulty for seamless operation of the site.

Client Side Programming:
Client-side (i.e. frontend) web development involves everything users see on their
screens. Here are the major frontend technology stack components.
 Hypertext Markup Language (HTML) and Cascading Style Sheets (CSS). HTML tell the
browser how to display the content of web pages, while CSS styles that
content, Bootstrap is a helpful framework for managing HTML and CSS.
 JavaScript (JS). JS Makes web pages interactive. There are many JavaScript
libraries (such as jQuery, AJAX) and frameworks (such as Hibernate) for faster
and easier web development.

Server Side Programming :

9 | P a g e

The server side isn’t visible to users, but it powers the client side, just as a power
station generates electricity for your house.
The challenge lies mainly in the choice of server side technologies for developing
you web application.
As for server side programming languages, they are used to create the logic of
websites and applications. Frameworks for programming languages offer lots of tools
for simpler and faster coding. Let’s mention some of the popular programming
languages and their major frameworks (in parentheses)
 Java (Hibernate)
Node.js, a JavaScript runtime, is also used for backend programming.
Web application needs a place to store its data and that’s when a Database is used.
There are two types of Databases: Relational and Non-Relational databases, each
having its pros and cons. Here are the most common databases for web
development.
 Oracle 10gXE
A web application needs a caching system to reduce the load on the database and
to handle large amount of traffic. Memcached and Redis are the most widespread
Caching system.
Finally, a web application needs a server to handle requests from client’s computers.
There are two major players in this domain:
 Apache
 Glassfish
To develop a web application, you need to select the server, database, programming
language, framework and frontend tools that you are going to use. These web
development technologies build on top of each other and are, in fact, collectively
called a stack.

How It Works?
E-Commerce web site system works with the help of a number of backend frontend
coding languages. The internal working is mainly based on the MVC flow of the E-
Commerce website.
MVC stands for – Model, View and Controller.

Model:

10 | P a g e

Model represents shape of the data and business logic. It maintains the data of the
application. Model Objects retrieve and store mol 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-terms
raises appropriate URL 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.
MVC is mostly used with spring for any web application development. It is very
powerful and nice layered architecture for flow and configuration. It is very flexible to
integrate with other web frameworks like struts. In spring web MVC, Dispatcher
servlet class works as the front controller. It is responsible to manage the flow of the
spring MVC application.
Let’s understand the steps involved in the MVC flow.
First request will be received by Dispatcher Servlet.
Second, dispatcher will take the help of handlerMapping and get to know the
Controller class name associated with the given request.
Third, so request transfer to controller, and then controller will process the request by
executing appropriate methods and returns ModeAndView object (contains Model
Data and View Name) back to Dispatcher Servlet.
Now the dispatcher servlet sends the model object to the view resolver to get the
actual view page.
Finally, the dispatcher servlet will pass the model object to the view page to display
the result.

How Do We Get The IDEA?
The invention of faster internet connectivity and powerful online tools has resulted in
a new commerce arena – E-Commerce. E-Commerce offered many advantages to
companies and customers.

11 | P a g e

 Faster buying/selling procedure, as well as easy to find products
Buying/Selling 24/7.
 More reach to customers, there is n theoretical geographic limitations.
 Low operational cost and better quality of services.
 No need of physical company set-ups.
 Easy to start and manage a business.
 Customers can easily select products from different providers without
moving around physically.


HARDWARE AND SOFTWARE
REQUIREMENT SPECIIFICATION

The hardware and software which can be employed to implement the code
generated in this project is listed below:
 Web Server
 Web Browser
 Server Software
 TCP/IP Address
 Ports and Protocols
 Web Authoring Tools
 Database System
 Domain Name
 Programming Requirements
 Browser and Platform Capabilities

Web Server
Web Server can refer to either the hardware (the computer) or the software (the
computer application) that help to deliver content that can be accessed through the
internet. The most common use of the web servers is to host websites but there are
other uses as well as such as data storage or running an enterprise application.

Web Browser
A web browser is a program/application designed to display the internet with web
pages. A few examples are Microsoft Edge and Google Chrome.

Server Software

12 | P a g e

Software is required in order for the server to run the software manages the
connections and the server, a few examples of home server software are:
 Apache
 Glass Fish Server




TCP/IP Addresses
Each computer must have unique IP address. TCP/IP uses four numbers to address
a compute. The numbers are in between 0-255. IP addresses are normally written as
four numbers separated by a period like this: 192.168.1.50. TCP/IP is used when
transferring data across a network. If computers do not use the same protocols, it
become impossible for the data to be understood.

Ports and Protocols
The protocol is the type of connection you are running through, examples are HTTP,
SSH, DNS and FTP. The port is the name of the connection you are going through,
the port no. usually the last 3 numbers of the default gateway, each device that is
connected to the network will have its own unique port number.

Web Authoring Tools
Web Authoring Tools are software or cloud servers that allow you to create and put
up a website. Microsoft publisher are the example that you can use.

Database System
A Database System is the Database a company uses to link with the website. It can
contain many things that will be changed by the users of the website. The database
will store Passwords, Names, Addresses, Store Items and other business
information.

Domain Name

13 | P a g e

The Domain Name is the main section of the website. Google is an example:
http://www.google.com/. Here “google” is the Domain Name.



Programming Languages :
Web Pages are usually written in HTML within the code other languages can be
used such as JSP, CSS,BOOTSTRAP and JavaScript. HTML itself doesn’t provide
E-Commerce capabilities so other languages must be used as well.

SYSTEM DESIGN



The Unified Modeling Language (UML) is a general-purpose, developmental,
modelling language in the field of software engineering that is intended to provide a
standard way to visualize the design of a system.
The creation UML was originally motivated by the desire to standardize the disparate
notational system and approaches to software design. It was developed by Grady
Booch, Ivan Jacobson and James RumBaugh at Rational Software in 1994-1995,
with further development led by them in 1996.
In 1997 UML was adopted as a standard by the Object Management Group (OMG),
and has been managed by this organization ever since. In 2005 UML was also
published by the International Organization of Standardization (ISO) as an approved
ISO standard. Since then the standard has been periodically revised to cover the
latest revision of UML.

14 | P a g e












USE-CASE DIAGRAM

15 | P a g e








Fig:use-case diagram

16 | P a g e

ACTIVITY DIAGRAM

17 | P a g e

CLASS DIAGRAM

18 | P a g e

DFD (DATA FLOW DIAGRAM)

0
TH
LEVEL DFD

1
ST
LEVEL DFD (USER)

19 | P a g e

1
ST
LEVEL DFD (ADMIN)



2
ND
LEVEL DFD (USER)

20 | P a g e

2
ND
LEVEL DFD (ADMIN)

21 | P a g e

DATABASE TABLES

22 | P a g e

23 | P a g e

User Interface
Home

24 | P a g e

Forms

25 | P a g e

Navigation Menu

26 | P a g e

Page by Brand

27 | P a g e

Checkout Page



Email confirmation

28 | P a g e

Admin Interface

Login

29 | P a g e

Dashboard


Add product

30 | P a g e

Viewp/Edit/Delete product

31 | P a g e







CODING

32 | P a g e

Index.jsp

<html>
<head>
<title>Online shopping site in India...</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<link href="css/jquery.bxslider.css" rel="stylesheet"
type="text/css">
<link href="css\style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-
awesome.min.css">
<link rel="stylesheet"
href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="css/style.css" type="text/css"/>

<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></s
cript>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.j
s"></script>
<style>

h3
{
color:black;
}

33 | P a g e


</style>

<script src="http://code.jquery.com/jquery-2.2.4.js"
crossorigin="anonymous"></script>
<script src="js/jquery.bxslider.min.js"></script>
<script src="js/my.js">
</script>
</head>
<body>
<div id="wrapper">
<div id= "container">
<div id="logo">
<span id="shoppers">SHOPPERS.</span><span
id="com">com</span>
</div>
<div id="search">
<form action="" class="search">
<input class="search-area" type="text" name="text"
placeholder="Search here for products">
<button type="submit" class="btn"><i class="fa fa-
search"></i></button>
</form>
</div>
<div id="user-menu">
<ul>
<li>
<a href="#">

34 | P a g e

<i class="fa fa-shopping-cart"><strong> Cart</strong></i>

</a>
</li>
<li>
<a href="#" id="popup" onclick="popup()">
<i class="fa fa-user"><b> Login & Signup</b></i>
</a>
</li>
<li>
<a href="#">
<i class="fa fa-download"><strong> &nbsp;APP
Download</strong></i>
</a>
</li>
</ul>
</div>
</div>
<div class="navbar">
<div class="dropdown">
<button class="dropbtn" style="margin-left:
80px;">Electronices
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black"><strong>Mobiles</strong></p>

35 | P a g e

<a href="mi.jsp">Mi</a>
<a href="#">RealMe</a>
<a href="samsung.jsp">Samsung</a>
<a href="lenovo.jsp">Lenovo</a>
<a href="oppo.jsp">Oppo</a>
<a href="#">Vivo</a>
<a href="apple.jsp">Apple</a>
<a href="#">Honor</a>

</div>
<div class="column">
<p style="color: black"><strong>Mobiles
Accessories</strong></p>
<a href="#">Mobile Cases</a>
<a href="#">Headphones and Headsets</a>
<a href="#">Screenguards</a>
<a href="#">Powerbank</a>
<a href="#">Memory card</a>
<a href="#">Smart Headphones</a>
<a href="#">Mobile cables</a>
<a href="#">Mobile chargers</a>
<a href="#"><b>Smart Wearable Tech</b></a>
<a href="#">Smart Headphones</a>
<a href="#">Smart Watches</a>
<!--<a href="#">Smart Glases(VR)</a>
<a href="#">Smart Bands</a>-->
</div>
<div class="column">

36 | P a g e

<p style="color: black"><strong>Laptops and
PCs</strong></p>
<a href="#">Gaming Laptops</a>
<a href="#"><b>Desktops PCs</b></a>
<a href="#"><b>Gaming & Accessories</b></a>
<a href="#"><b>Computer Accessories</b></a>
<a href="#">Externals Hard Disks</a>
<a href="#">Pendrives</a>
<a href="#">Laptop skins</a>
<a href="#">Laptop Bags</a>
<a href="#">Mouse</a>
<a href="#"><b>Computer Peripherals</b></a>
<a href="#">Printers and Ink cartridges</a>
<!--<a href="#">Monitors</a>
<a href="#">Laptop skins</a>
<a href="#"><b>Tablets</b></a>
<a href="#">Apple Ipads</a>-->
</div>
<div class="column">
<p style="color: black"><strong>Televisions</strong></p>
<a href="#"><b>Home Entertaintment</b></a>
<a href="#">Home Audio Speakers</a>
<a href="#">Home Theatres</a>
<a href="#">Bluetooth Speakers</a>
<a href="#">DTH Set Top Box</a>
<a href="#"><b>Smart Home Automation</b></a>
<a href="#">Google Home</a>
<a href="#"><b>Camera</b></a>

37 | P a g e

<a href="#">DSLR</a>
<a href="#">Compact & Bridge Camera</a>
<a href="#">Sports & Action</a>
<a href="#"><b>Camera Accessories</b></a>
<a href="#">Lens</a>
<!--<a href="#">Tripods</a>
<a href="#"><b>Network Components</b></a>
<a href="#">Routers</a>-->
</div>

</div>
</div>
</div>
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">TVs &
Appliances
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black"><strong>Television</strong></p>
<a href="#"><b>Smart & Ultra HD</b></a>
<a href="#"><b>TVs By Brand</b></a>
<a href="#">Mi</a>
<a href="#">LG</a>
<a href="#">SAMSUNG</a>
<a href="#">Micromax</a>

38 | P a g e

<p style="color: black; margin-top: 10px;"><strong>TVs By
Screen Size</strong></p>
<a href="#">48 & Above</a>
<a href="#">39-43</a>
<a href="#">32</a>
<a href="#">24 & below</a>
</div>
<div class="column">
<p style="color: black;"><strong>Washing
Machine</strong></p>
<a href="#">Fully Automatic Front Load</a>
<a href="#">Semi Automatic Top Load</a>
<a href="#">Fully Automatic Front Load</a>
<p style="color: black;margin-top:
10px;"><strong>Refrigerators</strong></p>
<a href="#">Single Door</a>
<a href="#">Double Door</a>
<a href="#">Triple Door</a>
<a href="#">Side By Side</a>
<a href="#">Convertoble</a>
<p style="color: black;margin-top: 10px;"><strong>Air
Conditioners</strong></p>
<a href="#">Inverter AC</a>
<a href="#">Windows ACs</a>
<a href="#">Split ACs</a>
</div>
<div class="column">
<p style="color: black;"><strong>Kitchen
Appliances</strong></p>

39 | P a g e

<a href="#">Oven Toaster Grills(OTG)</a>
<a href="#">Juicer/Mixer/Grinder</a>
<a href="#">Electric Kettle</a>
<a href="#">Electric Cokkers</a>
<a href="#">Sandwich Makers</a>
<a href="#">Pop-Up Toasters</a>
<a href="#">Coffee Makers</a>
<a href="#">Dishwashers</a>
<a href="#"><b>Healthy Living Appliances</b></a>
<a href="#"><b>Monsoon Cooking</b></a>
</div>
<div class="column">
<p style="color: black;"><strong>Small Home
Appliances</strong></p>
<a href="#">Irons</a>
<a href="#">Water Gysers</a>
<a href="#">Water Purifiers</a>
<a href="#">Air Purifiers</a>
<a href="#">Vacuum Cleaners</a>
<a href="#">Inverters</a>
<a href="#">Voltage Steblizers</a>
<a href="#">Immersion Rods</a>
</div>
</div>
</div>
</div>
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">Men

40 | P a g e

<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black;" ><strong>Footwear</strong></p>
<a href="#">Sports Shoes</a>
<a href="#">CasualShoes </a>
<a href="#">Formal Shoes</a>
<a href="#">Sandals and Floaters</a>
<a href="#">Loafers</a>
<a href="#">Boots</a>
<a href="#">Running Shoes</a>
<a href="#">Sneakers</a>
<p style="color: black; margin-top: 10px;"><strong>Men's
Grooming</strong></p>
<a href="#">Deodorants</a>
<a href="#">Perfumes</a>
<a href="#">Beard Care</a>
<a href="#">Trimmers</a>
</div>
<div class="column">
<p style="color: black;" >
<strong>Clothing</strong></p>
<a href="#"><b> Top Wears</b></a>
<a href="#"> T- Shirts</a>
<a href="#"> Shirts</a><a href="#">Link 1</a>
<a href="#">Kurtas</a>

41 | P a g e

<a href="#">Suits And Blazzers</a>
<a href="#">Jackets</a>
<a href="#">SweatShirts</a>
<p style="color: black; margin-top: 10px;"><strong>Bottom
Wears</strong></p>
<a href="#">Jeans</a>
<a href="#">Trousers</a>
<a href="#">Shorts</a>
<a href="#">Cargo</a>
</div>
<div class="column">
<p style="color: black;"><strong>Sports Wear</strong></p>
<a href="#">Sports T-Shirts</a>
<a href="#">Trackpants</a>
<a href="#">Shorts</a>
<a href="#">Track Suits</a>
<p style="color: black; margin-top: 10px;"><strong>InnerWear & Sleep
Wear</strong></p>
<a href="#">Briefs & Trunks</a>
<a href="#">Vests</a>
<a href="#">Boxers</a>
<a href="#">Thermals</a>
<a href="#"><b>Ties,Caps,Socks & More</b></a>
<a href="#"><b>Kurta Pyjama & More</b></a>
<a href="#"><b>Fabrices</b></a>
<a href="#"><b>Winter Wears</b></a>
</div>
<div class="column">

42 | P a g e

<p style="color: black;" >
<strong>Watches</strong></p>
<a href="#">Fasttrack</a>
<a href="#">Titan</a>
<a href="#">Sonata</a>
<a href="#">Casio</a>
<a href="#">Fossil</a>
<p style="color: black; margin-top:
10px;"><strong>Accesories</strong></p>
<a href="#">Backpacks</a>
<a href="#">Wallets</a>
<a href="#">Sunglases</a>
<a href="#">Belts</a>
<a href="#">Luggage & Travel</a>
</div>
</div>
</div>
</div>
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">Women
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black;" ><strong>Clothing</strong></p>
<a href="#"><b>Western Wear</b></a>
<a href="#">Top,T-Shirts & Shirts</a>

43 | P a g e

<a href="#">Dresses</a>
<a href="#">Jeans</a>
<a href="#">Leggings & Jeggings</a>
<a href="#">Shorts</a>
<a href="#">Skirts</a>
<a href="#"><b>Lingries & SleepWear</b></a>
<a href="#">Nightsuits & Nightdresses</a>
<a href="#">Shapewear</a>
<a href="#"><b>Sports Wear</b></a>
<a href="#">T-Shirts</a>
<a href="#">Trakpants</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Ethnic Wear</strong></p>
<a href="#">Sarees</a>
<a href="#">Kurtas & Kurtis</a>
<a href="#">Dress Material</a>
<a href="#">Lehenga Choli</a>
<a href="#">Blouse</a>
<a href="#">Leggings & Salwars</a>
<a href="#">Peticoats</a>
<a href="#">Duppatas</a>
<a href="#"><b>Winter Wear</b></a>
<a href="#">International Brands</a>
<a href="#">New Arrivals</a>
<a href="#">Party Dresses</a>
<a href="#">Crop Tops</a>

44 | P a g e

</div>
<div class="column">
<p style="color: black;" ><strong>Footwear</strong></p>
<a href="#"><strong>Sandals</strong></a>
<a href="#">Flats</a>
<a href="#">heels</a>
<a href="#">Wedges</a>
<a href="#"><b>Shoes</b></a>
<a href="#">Sports Shoes</a>
<a href="#">Boots</a>
<a href="#">Casual Shoes</a>
<a href="#"><b>Sllipers & Flip Flop's</b></a>
<a href="#"><b>Personal Care Appliances</b></a>
<a href="#">Hair Straightners</a>
<a href="#">Hair Dryers</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Beauty & Grooming</strong></p>
<a href="#">Make Up</a>
<a href="#">Skin Care</a>
<a href="#">Hair Care</a>
<a href="#">Bath & Spa</a>
<a href="#">Skin Care</a>
<a href="#">Deodrants & Perfumes</a>
<a href="#"><b>Accessories</b></a>
<a href="#">Slings Bags</a>
<a href="#">Wallets & Belts</a>

45 | P a g e

<a href="#">Luggage & Travel</a>
<a href="#">Sunglasses</a>
</div>
</div>
</div>
</div>
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">Baby & Kids
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black;" ><strong>Kids Clothing</strong></p>
<a href="#"><b>Boy's Clothing</b></a>
<a href="#">Polos & T-Shirts</a>
<a href="#">Ethnic Wear</a>
<a href="#">Shorts</a>
<a href="#"><b>Girl's Clothing</b></a>
<a href="#">Dresses & Skirts</a>
<a href="#">Ethnic Wear</a>
<a href="#">T-Shirts & Tops</a>
<a href="#"><b>Baby Boy Clothing</b></a>
<a href="#">Body Suits</a>
<a href="#">Polos & T-Shirts</a>
<a href="#"><b>Baby Girl Clothing</b></a>
<a href="#">Dresses</a>

46 | P a g e

</div>
<div class="column">
<p style="color: black;" ><strong>Kids Footwear</strong></p>
<a href="#"><b>Boy's Footwear</b></a>
<a href="#">Sandals</a>
<a href="#">Sports Shoes</a>
<a href="#"><b>Girl's Footwear</b></a>
<a href="#">Flats & Bellis</a>
<a href="#">Sports Shoes</a>
<a href="#"><b>Boy's Footwear</b></a>
<a href="#">Booties</a>
<a href="#"><b>Character Shoes</b></a>
<a href="#"><b>School Supplies</b></a>
<a href="#">School Bags</a>
<a href="#">Lunch Box</a>
<a href="#">Kids Watches</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Toys</strong></p>
<a href="#">Remote Control Toys</a>
<a href="#">Educational Toys</a>
<a href="#">Soft Toys</a>
<a href="#">Cars & Die-Cast Vehicle</a>
<a href="#">OutDoor Toys</a>
<a href="#">Board Games</a>
<a href="#">Musical Toys</a>
<a href="#">Dolls & Doll Houses</a>

47 | P a g e

<a href="#">Puzzels</a>
<a href="#">Helicopter & Drones</a>
<a href="#">Toy Guns</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Baby Care</strong></p>
<a href="#">Diapers</a>
<a href="#">Wipes</a>
<a href="#">Strollers & Activity Gears</a>
<a href="#">Baby Badding</a>
<a href="#">Feeding & Nursing</a>
<a href="#">Maternity Care</a>
<a href="#">Bath Bath & Skin Care</a>
<a href="#">Baby Grooming</a>
<a href="#">Baby Gifting Sets</a>
<a href="#">Furniture</a>
</div>
</div>
</div>
</div>
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">Home & Furniture
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">

48 | P a g e

<p style="color: black;" ><strong>Kitchen &
Dinning</strong></p>
<a href="#">Pots & Pans</a>
<a href="#">Pressure Cookers</a>
<a href="#">Kitchen Tools</a>
<a href="#">Gas Stoves</a>
<p style="color: black; margin-top: 10px;" ><strong>Dinning
& Serving</strong></p>
<a href="#">Coffee Mugs</a>
<a href="#">Dinnerware & Cokkery</a>
<a href="#">Bar & Glasware</a>
<p style="color: black; margin-top: 10px;" ><strong>Kitchen
Storage</strong></p>
<a href="#">Water Bottles</a>
<a href="#">Lunch Boxes</a>
<a href="#">Flasks & Casseroles</a>
<a href="#">Kitchen Containers</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Furniture</strong></p>
<a href="#">Soffas</a>
<a href="#">Beds</a>
<a href="#">Dinning Tables & Sets</a>
<a href="#">Tables</a>
<a href="#">Office Chairs</a>
<a href="#">Chairs</a>
<a href="#">Bean Bags</a>
<a href="#">Shoe Racks</a>

49 | P a g e

<a href="#">Wardrobes</a>
<a href="#">Sofa Beds</a>
<a href="#">Drawers</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Furnishing</strong></p>
<a href="#">Bedsheets</a>
<a href="#">Cutains</a>
<a href="#">Cushion & Pillow Covers</a>
<a href="#">Blankets,Quilts & Dohars</a>
<a href="#">Towels</a>
<a href="#">kitchen & Dinning Linen</a>
<a href="#">Mats & Carpet</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Home Decor</strong></p>
<a href="#">Paintings</a>
<a href="#">Clocks</a>
<a href="#">Wall Shelves</a>
<a href="#">Wall Decals</a>
<a href="#"><b>Lighting</b></a>
<a href="#">Smart Lighting</a>
<a href="#">LED & CFL</a>
<a href="#">Decorative Lighting & Lamps</a>
<a href="#">Emergency Light</a>
<a href="#">Link 3</a>
</div>

50 | P a g e

</div>
</div>
</div>
</div>
<div class="Imageslider">
<ul class="bxslider">
<li><img src="image/slider2.jpg" height="350" width="100%"></li>
<li><img src="image/slider7.jpg" height="350" width="100%;"></li>
<li><img src="image/slider5.jpg" height="350" width="100%;"></li>
<li><img src="image/slider6.jpg" height="350" width="100%;"></li>
</ul>
</div>

<!-=======================categories====================-->
<div class="daydeal">
<div class="d-o-d-header"><h2>Deals of The day</h2><hr>
<button class="d-o-d-btn">View All</button>
</div>
<a href="">
<div class="catbox">
<img src="image/one.jfif" alt="image not found">
<span>20% off on Men's Shoes</span>
</div>
</a>
<a href="">
<div class="catbox">
<img src="image/two.jfif" alt="image not found">

51 | P a g e

<span>30% off on Backpacks</span>
</div>
</a>
<a href="">
<div class="catbox">
<img src="image/three.jfif" alt="image not found">
<span>10% off on Headphones</span>
</div>
</a>
<a href="">
<div class="catbox">
<img src="image/foue.jfif" alt="image not found">
<span>50% off on Sneakers</span>
</div>
</a>
<a href="">
<div class="catbox">
<img src="image/six.jfif" alt="image not found">
<span>20% off on powerbank</span>
</div>
</a>
</div>
<!--============================ popup
signup================================= -->
<div class="bg-model">
<div class="model-content">
<div class="close">
<button id="close"> <i class="fa fa-close"></i> </button>

52 | P a g e

</div>
<img src="image/si/signup.png" height="80" width="80" alt="not
found"><br>
<form action="Connectivity" method="post">
<p id="msg">Registered Succesfully</p>
<input type="text" id="name" placeholder="Enter your Name" name="n">
<br>
<input type="text" id="m_num" placeholder="Enter Mobile Number"
name="mb"><br>
<input type="password" id="pass" placeholder="Enter password "
name="pas"><br>
<input type="password" id="cpas" placeholder="Confirm
Password"><br>
<button type="submit" id="sign_btn">Sign Up</button>
</form>
<form action="">
<button type="submit" style="background-
color:ghostwhite;color:dodgerblue;" id="login">Existing User?
LogIn</button>
</form>
</div>
<div class="login-content">
<div class="close_login">
<button id="close_login"> <i class="fa fa-close"></i> </button>
</div>
<img src="image/si/signup.png" height="80" width="80" alt="image not
found"><br>
<form action="checkUser.jsp" method="post">
<input type="text" placeholder="Enter UserName" name="un"><br>

53 | P a g e

<input type="password" placeholder="Enter Password"
name="pass"><br>
<button type="submit" id="login_btn">Login</button>
</form>
<form action="">
<button type="submit" style="background-
color:ghostwhite;color:dodgerblue;" id="signup">New to Shoppers?
Signup</button>
</form>
</div>
</div>
<!--========category2===============-->
<div class="ps-care" >
<div class="d-o-d-header"><h2>Personal & Health Care</h2><hr>
<button class="d-o-d-btn">View All</button>
<a href="">
<div class="ps-catbox">
<img src="image/perscare/pc1.jpeg" width="142.50" height="150"
alt="image not found">
<div class="ps-details">
<b><p margin>Phillips Trimmers</p></b>
<span>Best Sellers</span>
<p class="off">Upto 20% off</p>
</div>
</div>
</a>
<a href="">
<div class="ps-catbox">

54 | P a g e

<img src="image/perscare/pc2.jpeg" width="134" height="150"
alt="image not found">
<div class="ps-details">
<b><p margin>Massagers</p></b>
<span>from Rs.99</span>
<p class="off">Scholl,Max & More</p>
</div>
</div>
</a>
<a href="">
<div class="ps-catbox">
<img src="image/perscare/pc3.jpeg" width="150" height="133"
alt="image not found">
<div class="ps-details">
<b><p margin>Hair Dryers</p></b>
<span>Top Brands</span>
<p class="off">philips,Panasonic</p>
</div>
</div>
</a>
<a href="">
<div class="ps-catbox">
<img src="image/perscare/pc6.jpeg" width="150" height="124"
alt="image not found">
<div class="ps-details">
<b><p margin>Health Sense BP Monitors</p></b>
<span>Best Deals</span>
<p class="off">35% off</p>

55 | P a g e

</div>
</div>
</a>
<a href="">
<div class="ps-catbox">
<img src="image/perscare/pc7.jpeg" width="142.50" height="150"
alt="image not found">
<div class="ps-details">
<b><p margin>Mens Grooming</p></b>
<span>Best Sellers</span>
<p class="off">Philips,Nova & others</p>
</div>
</div>
</a>
<a href="">
<div class="ps-catbox">
<img src="image/perscare/pc8.jpeg"height="150" width="66.5"
alt="image not found">
<div class="ps-details">
<b><p margin>Trimmers</p></b>
<span>Best Sellers</span>
<p class="off">Upto 20% off</p>
</div>
</div>
</a>

<a href="">
<div class="ps-catbox">

56 | P a g e

<img src="image/perscare/pc10.jpeg" height="150" width="50" margin-
top:1 alt="image not found">
<div class="ps-details">
<b><p margin>Nova Prime Series </p></b>
<span>Best Seller</span>
<p class="off">Rs.899 </p>
</div>
</div>
</a>
</div>

</div>
<!--======================category2====================-->
<div class="mobiles" >
<div class="d-o-d-header"><h2>Mobiles</h2><hr>
<button class="d-o-d-btn">View All</button>
</div>
<a href="#">
<div class="ps-catbox">
<img src="image/phones/ph1.jpeg" width="72" height="150" alt="image
not found">
<div class="mb-details">
<p><b>Redmi Note 5 pro</b></p>
<span>Best Sellers</span>
<p style="margin-left: -30px;" class="off">Upto 20% off</p>
</div>
</div>
</a>

57 | P a g e

<a href="#">
<div class="ps-catbox">
<img src="image/phones/ph2.jpeg" width="74" height="150" alt="image
not found">
<div class="mb-details">
<b><p>Realme 2</p></b>
<span>13MP+2MP| 8MP</span>
<p class="off">From Rs.8,990</p>
</div>
</div>
</a>
<a href="#">
<div class="ps-catbox">
<img src="image/phones/ph3.jpeg" width="70.5" height="150"
alt="image not found">
<div class="mb-details">
<b><p >iVOOMi i2 Lite</p></b>
<span >13MP+2MP Dual Camera</span>
<p class="off">Noe Rs.6499</p>
</div>
</div>
</a>
<a href="#">
<div class="ps-catbox">
<img src="image/phones/ph4.jpeg" width="74.5" height="150"
alt="image not found">
<div class="mb-details">
<b><p>iPhoneX 256GB</p></b>

58 | P a g e

<span>12MP+12MP| 7MP</span>
<p class="off">Now Rs.1,01,999</p>
</div>
</div>
</a>
<a href="#">
<div class="ps-catbox">
<img src="image/phones/ph5.jpeg" width="72" height="150" alt="image
not found">
<div class="mb-details">
<b><p >Redmi Note 5</p></b>
<span >12MP+5MP Camera</span>
<p class="off">Now Rs.11999</p>
</div>
</div>
</a>
<a href="#">
<div class="ps-catbox">
<img src="image/phones/ph6.jpeg" width="74.5" height="150"
alt="image not found">
<div class="mb-details">
<b><p>Google Pixel 2</p></b>
<span>4GB RAM</span>
<p class="off">From Rs.47,999</p>
</div>
</div>
</a>
<a href="#">

59 | P a g e

<div class="ps-catbox">
<img src="image/phones/ph7.jpeg" width="79.5" height="150;"
style="margin-right: -20px" alt="image not found">
<div class="mb-details">
<b><p>Lenonvo K8 Plus</p></b>
<span>13MP+5MP| 8MP</span>
<p class="off">From Rs.9999</p>
</div>
</div>
</a>
</div>


<!--------------------------------Footer----------------------->

<div class="foot" id="footid">
<footer>
<div class="about">
<ul>
<li class="head"><a href="">About</a></li>
<li><a href="">Contact Us</a></li>
<li><a href="">About Us</a></li>
<li><a href="">Careers</a></li>
<li><a href="">Shoppers Stories</a></li>
</ul>
</div>
<div class="help">
<ul>

60 | P a g e

<li><a href="">Help</a></li>
<li><a href="">Payments</a></li>
<li><a href="">Shipping</a></li>
<li><a href="">Cancellation & Returns</a></li>
<li><a href="">FAQ</a></li>
</ul>
</div>
<div class="policy">
<ul>
<li><a href="">Policy</a></li>
<li><a href="">Return Policy</a></li>
<li><a href="">Terms of Use</a></li>
<li><a href="">Privacy</a></li>
<li><a href="">Sitemap</a></li>
</ul>
</div>
<div class="social">
<ul>
<li><a href="">Social</a></li>
<li><a href="">Facebook</a></li>
<li><a href="">Twitter</a></li>
<li><a href="">Youtube</a></li>
<li><a href="">Google plus</a></li>
</ul>
<div class="vl"></div>
</div>

61 | P a g e

</footer>
</div>
</div>
</body>
</html>

62 | P a g e

Header.jsp
<html>
<head>
<title>Online shopping site in India...</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/jquery.bxslider.css" rel="stylesheet" type="text/css">
<link href="css\style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet"
href="https://www.w3schools.com/w3css/4/w3.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></s
cript>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.j
s"></script>
<style>

h3
{
color:black;
}

</style>

<script src="http://code.jquery.com/jquery-2.2.4.js"
crossorigin="anonymous"></script>
<script src="js/jquery.bxslider.min.js"></script>

63 | P a g e

<script src="js/my.js">
</script>
</head>
<body>
<div id="wrapper">
<div id= "container">
<div id="logo">
<span id="shoppers">SHOPPERS.</span><span
id="com">com</span>
</div>
<div id="search">
<form action="" class="search">
<input class="search-area" type="text" name="text"
placeholder="Search here for products">
<button type="submit" class="btn"><i class="fa fa-search"></i></button>
</form>
</div>


<div id="user-menu">
<ul>
<li>
<a href="#">
<i class="fa fa-shopping-cart"><strong> Cart</strong></i>
</a>
</li>
<li>
<a href="#" id="popup" onclick="popup()">

64 | P a g e

<i class="fa fa-user"><b>
<%

HttpSession s=request.getSession(false);
String user=(String)s.getAttribute("uname");
if(s!=null)
{

out.print("Hi : "+user);


}
else
{
out.print("Error In Login Try Again.....");

response.sendRedirect("index.html");
}


%>
</b></i>
</a>

</li>
<a href="UserLogout.jsp"> <span>Logout</span></a>
<li>

65 | P a g e

<a href="#">
<i class="fa fa-download"><strong> &nbsp;APP Download</strong></i>
</a>
</li>
</ul>
</div>
</div>
<div class="navbar">
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">Electronices
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black"><strong>Mobiles</strong></p>
<a href="mi.jsp">Mi</a>
<a href="#">RealMe</a>
<a href="samsung.jsp">Samsung</a>
<a href="lenovo.jsp">Lenovo</a>
<a href="oppo.jsp">Oppo</a>
<a href="#">Vivo</a>
<a href="apple.jsp">Apple</a>
<a href="#">Honor</a>
</div>
<div class="column">
<p style="color: black"><strong>Mobiles Accessories</strong></p>

66 | P a g e

<a href="#">Mobile Cases</a>
<a href="#">Headphones and Headsets</a>
<a href="#">Screenguards</a>
<a href="#">Powerbank</a>
<a href="#">Memory card</a>
<a href="#">Smart Headphones</a>
<a href="#">Mobile cables</a>
<a href="#">Mobile chargers</a>
<a href="#"><b>Smart Wearable Tech</b></a>
<a href="#">Smart Headphones</a>
<a href="#">Smart Watches</a>
</div>
<div class="column">
<p style="color: black"><strong>Laptops and PCs</strong></p>
<a href="#">Gaming Laptops</a>
<a href="#"><b>Desktops PCs</b></a>
<a href="#"><b>Gaming & Accessories</b></a>
<a href="#"><b>Computer Accessories</b></a>
<a href="#">Externals Hard Disks</a>
<a href="#">Pendrives</a>
<a href="#">Laptop skins</a>
<a href="#">Laptop Bags</a>
<a href="#">Mouse</a>
<a href="#"><b>Computer Peripherals</b></a>
<a href="#">Printers and Ink cartridges</a>
</div>
<div class="column">

67 | P a g e

<p style="color: black"><strong>Televisions</strong></p>
<a href="#"><b>Home Entertaintment</b></a>
<a href="#">Home Audio Speakers</a>
<a href="#">Home Theatres</a>
<a href="#">Bluetooth Speakers</a>
<a href="#">DTH Set Top Box</a>
<a href="#"><b>Smart Home Automation</b></a>
<a href="#">Google Home</a>
<a href="#"><b>Camera</b></a>
<a href="#">DSLR</a>
<a href="#">Compact & Bridge Camera</a>
<a href="#">Sports & Action</a>

</div>
</div>
</div>
</div>
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">TVs & Appliances
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black"><strong>Television</strong></p>
<a href="#"><b>Smart & Ultra HD</b></a>
<a href="#"><b>TVs By Brand</b></a>

68 | P a g e

<a href="#">Mi</a>
<a href="#">LG</a>
<a href="#">SAMSUNG</a>
<a href="#">Micromax</a>
<p style="color: black; margin-top: 10px;"><strong>TVs By Screen
Size</strong></p>
<a href="#">48 & Above</a>
<a href="#">39-43</a>
<a href="#">32</a>
<a href="#">24 & below</a>
</div>
<div class="column">
<p style="color: black;"><strong>Washing Machine</strong></p>
<a href="#">Fully Automatic Front Load</a>
<a href="#">Semi Automatic Top Load</a>
<a href="#">Fully Automatic Front Load</a>
<p style="color: black;margin-top:
10px;"><strong>Refrigerators</strong></p>
<a href="#">Single Door</a>
<a href="#">Double Door</a>
<a href="#">Triple Door</a>
<a href="#">Side By Side</a>
<a href="#">Convertoble</a>
<p style="color: black;margin-top: 10px;"><strong>Air
Conditioners</strong></p>
<a href="#">Inverter AC</a>
<a href="#">Windows ACs</a>
<a href="#">Split ACs</a>

69 | P a g e

</div>
<div class="column">
<p style="color: black;"><strong>Kitchen Appliances</strong></p>
<a href="#">Oven Toaster Grills(OTG)</a>
<a href="#">Juicer/Mixer/Grinder</a>
<a href="#">Electric Kettle</a>
<a href="#">Electric Cokkers</a>
<a href="#">Sandwich Makers</a>
<a href="#">Pop-Up Toasters</a>
<a href="#">Coffee Makers</a>
<a href="#">Dishwashers</a>
<a href="#"><b>Healthy Living Appliances</b></a>
<a href="#"><b>Monsoon Cooking</b></a>
</div>
<div class="column">
<p style="color: black;"><strong>Small Home Appliances</strong></p>
<a href="#">Irons</a>
<a href="#">Water Gysers</a>
<a href="#">Water Purifiers</a>
<a href="#">Air Purifiers</a>
<a href="#">Vacuum Cleaners</a>
<a href="#">Inverters</a>
<a href="#">Voltage Steblizers</a>
<a href="#">Immersion Rods</a>
</div>
</div>
</div>

70 | P a g e

</div>
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">Men
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black;" ><strong>Footwear</strong></p>
<a href="#">Sports Shoes</a>
<a href="#">CasualShoes </a>
<a href="#">Formal Shoes</a>
<a href="#">Sandals and Floaters</a>
<a href="#">Loafers</a>
<a href="#">Boots</a>
<a href="#">Running Shoes</a>
<a href="#">Sneakers</a>
<p style="color: black; margin-top: 10px;"><strong>Men's
Grooming</strong></p>
<a href="#">Deodorants</a>
<a href="#">Perfumes</a>

<a href="#">Trimmers</a>

</div>
<div class="column">
<p style="color: black;" >
<strong>Clothing</strong></p>

71 | P a g e

<a href="#"><b> Top Wears</b></a>
<a href="#"> T- Shirts</a>
<a href="#"> Shirts</a><a href="#">Link 1</a>
<a href="#">Kurtas</a>
<a href="#">Suits And Blazzers</a>
<a href="#">Jackets</a>
<a href="#">SweatShirts</a>
<p style="color: black; margin-top: 10px;"><strong>Bottom
Wears</strong></p>
<a href="#">Jeans</a>
<a href="#">Trousers</a>
<a href="#">Shorts</a>

</div>
<div class="column">
<p style="color: black;"><strong>Sports Wear</strong></p>
<a href="#">Sports T-Shirts</a>
<a href="#">Trackpants</a>
<a href="#">Shorts</a>
<a href="#">Track Suits</a>
<p style="color: black; margin-top: 10px;"><strong>InnerWear & Sleep
Wear</strong></p>
<a href="#">Briefs & Trunks</a>
<a href="#">Vests</a>
<a href="#">Boxers</a>
<a href="#">Thermals</a>
<a href="#"><b>Ties,Caps,Socks & More</b></a>
<a href="#"><b>Kurta Pyjama & More</b></a>

72 | P a g e

<a href="#"><b>Fabrices</b></a>
<a href="#"><b>Winter Wears</b></a>
</div>
<div class="column">
<p style="color: black;" >
<strong>Watches</strong></p>
<a href="#">Fasttrack</a>
<a href="#">Titan</a>
<a href="#">Sonata</a>
<a href="#">Casio</a>
<a href="#">Fossil</a>
<p style="color: black; margin-top:
10px;"><strong>Accesories</strong></p>
<a href="#">Backpacks</a>
<a href="#">Wallets</a>
<a href="#">Sunglases</a>
<a href="#">Belts</a>
<a href="#">Luggage & Travel</a>
</div>
</div>
</div>
</div>
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">Women
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">

73 | P a g e

<div class="column">
<p style="color: black;" ><strong>Clothing</strong></p>
<a href="#"><b>Western Wear</b></a>
<a href="#">Top,T-Shirts & Shirts</a>
<a href="#">Dresses</a>
<a href="#">Jeans</a>
<a href="#">Leggings & Jeggings</a>
<a href="#">Shorts</a>
<a href="#">Skirts</a>
<a href="#"><b>Lingries & SleepWear</b></a>
<a href="#">Nightsuits & Nightdresses</a>
<a href="#">Shapewear</a>
<a href="#"><b>Sports Wear</b></a>
<a href="#">T-Shirts</a>
<a href="#">Trakpants</a>

</div>
<div class="column">
<p style="color: black;" ><strong>Ethnic Wear</strong></p>
<a href="#">Sarees</a>
<a href="#">Kurtas & Kurtis</a>
<a href="#">Dress Material</a>
<a href="#">Lehenga Choli</a>
<a href="#">Blouse</a>
<a href="#">Leggings & Salwars</a>
<a href="#">Peticoats</a>
<a href="#">Duppatas</a>

74 | P a g e

<a href="#"><b>Winter Wear</b></a>
<a href="#">International Brands</a>
<a href="#">New Arrivals</a>
<a href="#">Party Dresses</a>
<a href="#">Crop Tops</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Footwear</strong></p>
<a href="#"><strong>Sandals</strong></a>
<a href="#">Flats</a>
<a href="#">heels</a>
<a href="#">Wedges</a>
<a href="#"><b>Shoes</b></a>
<a href="#">Sports Shoes</a>
<a href="#">Boots</a>
<a href="#">Casual Shoes</a>
<a href="#"><b>Sllipers & Flip Flop's</b></a>
<!--<a href="#"><b>Watches</b></a>
<a href="#"><b>Smart Watches</b></a>-->
<a href="#"><b>Personal Care Appliances</b></a>
<a href="#">Hair Straightners</a>
<a href="#">Hair Dryers</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Beauty & Grooming</strong></p>
<a href="#">Make Up</a>
<a href="#">Skin Care</a>

75 | P a g e

<a href="#">Hair Care</a>
<a href="#">Bath & Spa</a>
<a href="#">Skin Care</a>
<a href="#">Deodrants & Perfumes</a>
<a href="#"><b>Accessories</b></a>
<!--<a href="#">Smart Bands</a>
<a href="#">HandBags</a>
<a href="#">Shoulder Bags</a>-->
<a href="#">Slings Bags</a>
<a href="#">Wallets & Belts</a>
<a href="#">Luggage & Travel</a>
<a href="#">Sunglasses</a>
</div>
</div>
</div>
</div>
<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">Baby & Kids
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black;" ><strong>Kids Clothing</strong></p>
<a href="#"><b>Boy's Clothing</b></a>
<a href="#">Polos & T-Shirts</a>
<a href="#">Ethnic Wear</a>

76 | P a g e

<a href="#">Shorts</a>
<a href="#"><b>Girl's Clothing</b></a>
<a href="#">Dresses & Skirts</a>
<a href="#">Ethnic Wear</a>

<a href="#">T-Shirts & Tops</a>
<a href="#"><b>Baby Boy Clothing</b></a>
<a href="#">Body Suits</a>
<a href="#">Polos & T-Shirts</a>
<a href="#"><b>Baby Girl Clothing</b></a>

<a href="#">Dresses</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Kids Footwear</strong></p>
<a href="#"><b>Boy's Footwear</b></a>
<a href="#">Sandals</a>
<a href="#">Sports Shoes</a>
<a href="#"><b>Girl's Footwear</b></a>
<a href="#">Flats & Bellis</a>
<a href="#">Sports Shoes</a>
<a href="#"><b>Boy's Footwear</b></a>
<a href="#">Booties</a>
<a href="#"><b>Character Shoes</b></a>
<a href="#"><b>School Supplies</b></a>
<a href="#">School Bags</a>
<!--<a href="#">School Combo Sets</a>-->

77 | P a g e

<a href="#">Lunch Box</a>
<a href="#">Kids Watches</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Toys</strong></p>
<a href="#">Remote Control Toys</a>
<a href="#">Educational Toys</a>
<a href="#">Soft Toys</a>
<a href="#">Cars & Die-Cast Vehicle</a>
<a href="#">OutDoor Toys</a>
<a href="#">Board Games</a>
<a href="#">Musical Toys</a>
<a href="#">Dolls & Doll Houses</a>
<a href="#">Puzzels</a>
<a href="#">Helicopter & Drones</a>
<a href="#">Toy Guns</a>

</div>
<div class="column">
<p style="color: black;" ><strong>Baby Care</strong></p>
<a href="#">Diapers</a>
<a href="#">Wipes</a>
<a href="#">Strollers & Activity Gears</a>
<a href="#">Baby Badding</a>
<a href="#">Feeding & Nursing</a>
<a href="#">Maternity Care</a>
<a href="#">Bath Bath & Skin Care</a>

78 | P a g e

<a href="#">Baby Grooming</a>
<a href="#">Baby Gifting Sets</a>
<a href="#">Furniture</a>
</div>
</div>
</div>
</div>

<div class="dropdown">
<button class="dropbtn" style="margin-left: 80px;">Home & Furniture
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<div class="row">
<div class="column">
<p style="color: black;" ><strong>Kitchen & Dinning</strong></p>
<a href="#">Pots & Pans</a>
<a href="#">Pressure Cookers</a>
<a href="#">Kitchen Tools</a>
<a href="#">Gas Stoves</a>
<p style="color: black; margin-top: 10px;" ><strong>Dinning &
Serving</strong></p>
<a href="#">Coffee Mugs</a>
<a href="#">Dinnerware & Cokkery</a>
<a href="#">Bar & Glasware</a>
<p style="color: black; margin-top: 10px;" ><strong>Kitchen
Storage</strong></p>
<a href="#">Water Bottles</a>

79 | P a g e

<a href="#">Lunch Boxes</a>
<a href="#">Flasks & Casseroles</a>
<a href="#">Kitchen Containers</a>

</div>
<div class="column">
<p style="color: black;" ><strong>Furniture</strong></p>
<a href="#">Soffas</a>
<a href="#">Beds</a>
<a href="#">Dinning Tables & Sets</a>
<a href="#">Tables</a>
<a href="#">Office Chairs</a>
<a href="#">Chairs</a>
<a href="#">Bean Bags</a>
<a href="#">Shoe Racks</a>
<a href="#">Wardrobes</a>
<a href="#">Sofa Beds</a>
<a href="#">Drawers</a>

</div>
<div class="column">
<p style="color: black;" ><strong>Furnishing</strong></p>
<a href="#">Bedsheets</a>
<a href="#">Cutains</a>
<a href="#">Cushion & Pillow Covers</a>
<a href="#">Blankets,Quilts & Dohars</a>
<a href="#">Towels</a>

80 | P a g e

<a href="#">kitchen & Dinning Linen</a>
<a href="#">Mats & Carpet</a>
</div>
<div class="column">
<p style="color: black;" ><strong>Home Decor</strong></p>
<a href="#">Paintings</a>
<a href="#">Clocks</a>
<a href="#">Wall Shelves</a>
<a href="#">Wall Decals</a>
<a href="#"><b>Lighting</b></a>
<a href="#">Smart Lighting</a>
<a href="#">LED & CFL</a>
<a href="#">Decorative Lighting & Lamps</a>
<a href="#">Emergency Light</a>
<a href="#">Link 3</a>
</div>
</div>
</div>
</div>
</div>
<!--======= popup signup===================-->

<!--==============Page content================== -->

<!--=============Footer Content====================-->
<div class="foot" id="footid">
<footer>

81 | P a g e

<div class="about">
<ul>
<li class="head"><a href="">About</a></li>
<li><a href="">Contact Us</a></li>
<li><a href="">About Us</a></li>
<li><a href="">Careers</a></li>
<li><a href="">Shoppers Stories</a></li>
</ul>
</div>
<div class="help">
<ul>
<li><a href="">Help</a></li>
<li><a href="">Payments</a></li>
<li><a href="">Shipping</a></li>
<li><a href="">Cancellation & Returns</a></li>
<li><a href="">FAQ</a></li>
</ul>
</div>
<div class="policy">
<ul>
<li><a href="">Policy</a></li>
<li><a href="">Return Policy</a></li>
<li><a href="">Terms of Use</a></li>
<li><a href="">Privacy</a></li>
<li><a href="">Sitemap</a></li>
</ul>
</div>

82 | P a g e

<div class="social">
<ul>
<li><a href="">Social</a></li>
<li><a href="">Facebook</a></li>
<li><a href="">Twitter</a></li>
<li><a href="">Youtube</a></li>
<li><a href="">Google plus</a></li>
</ul>
<div class="vl"></div>
</div>

</footer>
</div>
</div>
</body>
</html>

83 | P a g e


Mi.jsp


<%@page import="servelet.ProductDao"%>
<%@page import="com.hibernate.Product"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="Header.jsp" %>
<!DOCTYPE html>
<html>
<head>
<link href="css/style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>mi-india</title>
<style>

img
{
height:200px;
width: 100px;
}
.b_btn
{
padding: 10px;
border-radius: 5px;
background-color: blue;

84 | P a g e

border: none;
color:white;
cursor: pointer;
}
.b_btn:hover
{
padding: 10px;
border-radius: 5px;
background-color: slateblue;
border: none;
color:white;
}
.a_btn
{
padding: 10px;
border-radius: 5px;
background-color: orangered;
border: none;
color:white;
cursor: pointer;
}
.a_btn:hover
{
padding: 10px;
border-radius: 5px;
background-color: orange;
border: none;

85 | P a g e

color:white;
}
</style>


</head>
<body>

<div class="mi">

<table cellspacing="50" width="100%">

<%


List<Product> list=ProductDao.viewByBrand("Mi");
for(Product p:list)
{
out.print("<tr><td><img
src='imageupload\\"+p.getProImage()+"'></td><td>"+p.getProDesc()+"</
td><td>"+p.getProPrice()+"</td><td><a href='add_cart.jsp?id'><button
class='a_btn'>Add To Cart</button></td><td><a
href='Checkout.jsp?id="+p.getProId()+"'><button class='b_btn'>Buy
Now</button></td></tr>");

}

%>

86 | P a g e

</table>
</table>

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

Apple.jsp

<%@page import="servelet.ProductDao"%>
<%@page import="java.util.List"%>
<%@page import="com.hibernate.Product"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="Header.html"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>JSP Page</title>
<style>

img
{
height:200px;
width: 100px;
}

87 | P a g e

.b_btn
{
padding: 10px;
border-radius: 5px;
background-color: blue;
border: none;
color:white;
cursor: pointer;
}
.b_btn:hover
{
padding: 10px;
border-radius: 5px;
background-color: slateblue;
border: none;
color:white;
}
.a_btn
{
padding: 10px;
border-radius: 5px;
background-color: orangered;
border: none;
color:white;
cursor: pointer;
}
.a_btn:hover

88 | P a g e

{
padding: 10px;
border-radius: 5px;
background-color: orange;
border: none;
color:white;
}
</style>

</head>
<body>

<div class="mi">

<table cellspacing="50" width="100%">

<%


List<Product> list=ProductDao.viewByBrand("Iphone");
for(Product p:list)
{
out.print("<tr><td><img
src='imageupload\\"+p.getProImage()+"'></td><td>"+p.getProDesc()+"</
td><td>"+p.getProPrice()+"</td><td><a href='add_cart.jsp?id'><button
class='a_btn'>Add To Cart</button></td><td><a
href='Checkout.jsp?id="+p.getProId()+"'><button class='b_btn'>Buy
Now</button></td></tr>");

89 | P a g e

}
%>
</table>
</table>
</div>
</body>
</html>

CheckUser.jsp
<%--
Document : checkUser
Created on : Oct 16, 2018, 11:41:31 PM
Author : Priyanshu
--%>
<%@page import="com.hibernate.EcomUser"%>
<%@page contentType="text/html" pageEncoding="UTF-8"
import="servelet.validate;"%>

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<%
try
{
String pass=request.getParameter("pass");

90 | P a g e

String un=request.getParameter("un");

if(validate.checkUser(un, pass))
{
HttpSession sc =request.getSession(true);
sc.setAttribute("uname",un);
response.sendRedirect("User.jsp");
}
else
{
request.getRequestDispatcher("/index.html").include(request, response);
out.print("Invalid Crediantials....... Try Again");
}
}
catch(Exception e)
{
out.print(e);
}
%>

</body>
</html>

91 | P a g e

Checkout.jsp
<%@page import="servelet.ProductDao"%>
<%@page import="com.hibernate.Product"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Checkout</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.mi
n.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></s
cript>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.j
s"></script>
<link href="css/style.css" rel="stylesheet">
<link href="Admin/dashboard.css" rel="stylesheet" type="text/css">
<style>
.con
{
position: absolute;
top:70%;
left: 40%;
}

92 | P a g e

.pro_image
{
margin: auto;
}
.pro_image img
{
height:300px;
width: 150px;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="header">
<div class="logo">
<span class="shoppers">SHOPPERS.</span><span
class="com">com</span>
</div>
</div>
<div class="pro_image" align="center">
<%
int pid=Integer.parseInt(request.getParameter("id"));
Product p=ProductDao.viewById(pid);
out.print("<img src='imageupload\\"+p.getProImage()+"'>");
out.print("<strong><h3
style='color:orange'>"+p.getProDesc()+"</h3></strong>");
out.print("<strong><h3
style='color:green'>"+p.getProPrice()+"</h3></strong>");

93 | P a g e

%>
</div>
<div class="con">
<form action="PlaceOrder.jsp">
<table align="center">
<tr>
<td>
<label>Name:</label>
<input type="text" required="" name="name" class="form-control">
</td>
</tr>
<tr>
<td>
<label>Address:</label>
<input type="text" name="addr" required="" class="form-control">
</td>
</tr>
<tr>
<td>
<label>Email Id:</label>
<input type="email" name="email" required="" class="form-control"><br>
</td>
</tr>
<tr>
<td>

<input type="Submit" class="btn btn-primary" value="PlaceOrder">

94 | P a g e

</td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>
PlaceOrder.jsp
<%--
Document : PlaceOrder
Created on : Nov 9, 2018, 3:54:16 PM
Author : Priyanshu
--%>

<%@page import="servelet.sendMail"%>
<%@page import="javax.mail.MessagingException"%>
<%@page import="javax.mail.Transport"%>
<%@page import="javax.mail.Message"%>
<%@page import="javax.mail.internet.InternetAddress"%>
<%@page import="javax.mail.internet.MimeMessage"%>
<%@page import="javax.mail.Session"%>
<%@page import="java.util.Properties"%>
<%@page import="java.util.Date"%>
<%@page import="com.hibernate.Product"%>
<%@page import="com.hibernate.Userorder"%>
<%@page import="servelet.OrderDao"%>

95 | P a g e

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Order</title>
</head>
<body>
<%
try
{

String name=request.getParameter("name");
String email=request.getParameter("email");
String addr=request.getParameter("addr");
String order_name="Mi A1";
Product p=new Product();
Date date=new Date();
Userorder uo=new Userorder(order_name,date, name, email,addr);
OrderDao.save(uo);
String to=email;
String sub="Confirmation of order Team Shoppers";
String mesg="Thank you for shopping with Shoppers Your Ordered
Placed Succesfully we will deliever shorty";
String user="joshipriyanshu007";
String pass="Priy@nshu12";
sendMail.send(to, sub, mesg, user, pass);
out.println("Notification Send");

96 | P a g e

out.println("order placed succesfully");
}
catch(Exception ex )
{
out.print(ex);

}
%>
</body>
</html>

Style.css
*
{
margin: 0px;
padding: 0px;
}
#wrapper
{
width:100%;
height: auto;
}

#container
{
height:60px;
width:100%;

97 | P a g e

background-color:#3377FF;
position:fixed;
float: left;
z-index: 1;
}

#logo
{
width: 23%;
}
#shoppers
{
color:#fff;
font-size:280%;
font-weight: bold;
margin-left: 15px;
font-family: cursive;
}
#com
{
color:#FFE033;
font-size:180%;
font-weight: bold;
font-family:serif;

}

98 | P a g e

#search
{
width: 40%;
float: left;
margin-left: 25%;
position: absolute;
top: 8px;
height: 40px;
}
.search-area
{
width: 100%;
border: none;
padding: 11.5px;
position: relative;
}

form.search button
{
top:0px;
right: 0px;
position: absolute;
width: 10%;
padding: 15px;
border: none;
background: #fff;
color:#3377FF;

99 | P a g e

cursor: pointer;
}

form.search button:hover
{
background-color: #FFE033
}

#user-menu
{
position: absolute;
right: 2%;
height: inherit;
top: 0px;
padding: 5px;

}
#user-menu li
{
float: left;
display: inline;
font-size: 25px;
margin-left: 20px;
margin-top: 4%;
list-style: none;
}
#user-menu a

100 | P a g e

{
text-decoration: none;
color: white;
font-size: 18px;
}
.menu
{
width: 100%;
height:100px;
margin-top:0px;
background-color:#fff;
}
body {
margin: 0px;
}

/*------styling for mega menu*/
* {
box-sizing: border-box;
}

body {
margin: 0;
}

.navbar {
position: absolute;

101 | P a g e

top: 60px;
background-color: #fff;
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
width: 100%;
}

.navbar a {

font-size: 12px;
color: white;
text-align: center;
padding: 20px 22px;
text-decoration: none;
margin-top: 2px;
}

.dropdown {
float: left;
overflow: hidden;
}

.dropdown .dropbtn {
font-size: 16px;
border: none;
outline: none;
color: black;

102 | P a g e

padding: 14px 16px;
background-color: white;
transition: all 0.4s ease;
font: inherit;
margin: 0;
}

.dropdown:hover .dropbtn
{
background-color: #3396FF;
color: whitesmoke;
transition: all 0.4s ease;
}
.navbar a:hover
{
color:#3396FF;

}

.dropbtn
{
margin-top: 100px;
color:black;
}
.dropdown-content {
display: none;
position: absolute;

103 | P a g e

background-color: #f9f9f9;
background:#fff;
width: 100%;
left: 0;
padding: 10px;
z-index: 1;
}

.dropdown:hover .dropdown-content {
display: block;
}

/* Create three equal columns that floats next to each other */
.column {
float: left;
width: 20%;
padding: 10px;
background-color: #fff;
height: auto;
}

.column a {
float: none;
color: black;
padding: 1px;
text-decoration: none;
margin-top: 20px;

104 | P a g e

margin-left: 40px;
display: block;
text-align: left;
}

.column a:hover {
background-color: #ddd;
}


/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
/*Image Slider*/

.imageslider
{
position: absolute;
top: 105px;

height: 350px;
width: 100%;
}
/*edit slider*/

105 | P a g e

.bx-wrapper .bx-pager
{
bottom: 25px;
}


.bx-wrapper .bx-controls-direction a
{
z-index: 0;
}
/* styling for Categories */

.daydeal
{
height:auto;
width: 100%;
position:absolute;
top: 450px;

}
.d-o-d-header
{
height: 50px;
width: 100%;
padding: 10px;
font-family: arial;

106 | P a g e

}
.d-o-d-header h2
{
line-height: 35px;
border-left: 20px solid blue;
padding-left: 10px;
}
.d-o-d-btn
{
color: white;
background-color: #3377FF;
font-size: 18px;
float: right;
padding: 10px;
margin-top: -80px;
border: none;
}
.catbox
{
font-family: sans-serif;
height:240px;
width: 220px;
float: left;
margin-top:auto;
overflow: hidden;
position: relative;
margin-left: 35px;

107 | P a g e

}
.catbox span
{
display: block;
position: absolute;
bottom: 100px;
width: 100%;
background: rgba(0,0,0,0.6);
color: white;
height: 35px;
line-height: 35px;
text-align: center;
}
.catbox img
{
max-width: 100%;
transition: all 0.5s ease;
}
.catbox:hover img
{
transform: scale(1.2,1.2);
transition: all 0.5s ease;
color:#3377FF;
}
.catbox:hover span
{
color:#3377FF;

108 | P a g e

}

/*Personal care Heading*/

.ps-care
{
position:absolute;
top: 790px;
height:auto;
width: 100%;
font-family: sans-serif;

}
.ps-catbox
{
float: left;
margin-left:50px;
}

.ps-catbox img
{
max-width: 100%;
transition: all .5s ease;
}
.ps-catbox:hover img
{
transition: all 0.5s ease;

109 | P a g e

transform: scale(1.1,1.1);
}
.ps-details
{
text-align: center;
line-height: 30px;
}
.ps-details span
{
color:#388e3c;
}
.ps-details .off
{
color:silver;
}
/*-------------------Mobiles styling-----------------*/
.mobiles
{
position: absolute;
top:1150px;
height:auto;
width: 100%;
position: relative;
font-family: sans-serif;
}
.mobiles img
{

110 | P a g e

margin-left: 40px;
}
.mb-details
{
text-align: center;
line-height: 30px;
font-size: 12px;
margin-left: 20px;
}
.mb-details span
{
color:#388e3c;
text-align: center;

}
.mb-details .off
{
color:silver;
text-align: center;
}
/*-----------------------Footer----------------*/

.foot
{
position: absolute;
top:1530px;
height: auto;

111 | P a g e

width: 100%;
color: white;
background-color:#505080;
font-family: sans-serif;
font-size: 12px;
line-height: 30px;
}
#content
{
margin-top: 500px;
width:100%;
height: auto;
background-color: yellow;
}

.foot li
{
list-style: none;
}
.foot a
{

text-decoration: none;
}
.about
{
padding: 80px;

112 | P a g e

border-bottom: 2px solid black;
}
.help
{
float: left;
margin-top: -230px;
margin-left: 270px;
}
.policy
{
float: left;
margin-top: -230px;
margin-left: 470px;
}
.social
{
margin-top: -230px;
margin-left: 670px;
float: left;
}
.vl
{
border-left: 2px solid black;
}
.foot ul > :first-child
{
color:#B3B3DC;

113 | P a g e

font-weight: bolder;

}
/*styling for mi page*/
.mi
{
height:250px;
width:100%;
background:white;
position: absolute;
top:150px;
left: 0px;
}
.mi-img
{
height: 250px;
width: 250px;

position: relative;
margin-top: 0px;
left: 200px;
z-index: 0;
}
.mi-img img
{
height: 200px;
width: 95.5px;

114 | P a g e


}
.mi-specs
{
height: 250px;
width: 600px;
position: relative;
left: 460px;
top: -250px;
z-index: 0;
}
.mi-rate
{
height: 250px;
width: 250px;
position: absolute;
top:0px;
left:1080px;
z-index: 0;

}
.mi-specs h3
{
position: absolute;
}
.mi-specs li
{

115 | P a g e

position: relative;
top:50px;
text-indent: -5px;
list-style: none;
}
/*styling for samsung mobile*/
.samsung
{

height:auto;
width: 100%;
position:absolute;
top: 100px;


}
/*styling for tv*/
.tv-img
{
height: 250px;
width: 250px;

position: relative;
margin-top: 0px;
left: 200px;
z-index: 0;
}

116 | P a g e

.tv-img img
{
height: 105px;
width: 200px;

}
/*styling for wahing*/
.wash-img
{
height: 250px;
width: 250px;

position: relative;
margin-top: 0px;
left: 200px;
z-index: 0;
}
.wash-img img
{
height: 200px;
width: 145px;

}
/*styling for popup sign up*/
.bg-model
{
height: 100%;

117 | P a g e

width: 100%;
background-color: black;
z-index: 1;
position: relative;
top:0px;
background-color: rgba(0,0,0,0.7);
display: flex;
align-items: center;
display: none;
justify-content: center;
}
.model-content
{
height:95%;
width: 60%;
background-color: white;
opacity: 1;
text-align: center;
padding: 10px;
border-radius: 4px;
position: absolute;

}
.model-content input
{
padding: 5px;
width: 60%;

118 | P a g e

margin-top: 4%;
margin-left: 25%;
display: block;
border: none;
border-bottom-style:inset ;
border-bottom-color:silver;
}
.model-content button
{
background-color: orangered;
color: white;
width: 60%;
font-size: 16px;
justify-content: center;
margin-left: 10%;
margin-top: 3%;
padding: 10px;
border: none;
cursor: pointer;

}
.model-content button:hover button{
transition: all 0.2s ease;
}
.close button
{
font-size: 20px;

119 | P a g e

background-color: red;
width: auto;
position: absolute;
right: 0px;
top: -4%;
padding:10px;

}

.login-content
{
height:600px;
width: 60%;
background-color: white;
opacity: 1;
text-align: center;
display:none;
padding: 10px;
border-radius: 4px;
position: relative;

}

#close_login
{
font-size: 20px;
background-color: red;

120 | P a g e

width: auto;
color: white;
position: absolute;
top:-4%;
border: none;
right: 0px;
padding:10px;

}
.login-content input
{
padding: 5px;
width: 60%;
margin-top: 4%;
margin-left: 25%;
display: block;
border: none;
border-bottom-style:inset ;
border-bottom-color:silver;
}
.login-content button
{
background-color: orangered;
color: white;
width: 60%;
font-size: 16px;
justify-content: center;

121 | P a g e

margin-left: 10%;
margin-top: 3%;
padding: 10px;
border: none;
cursor: pointer;

}

JavaScript
$('head').append('<link rel="stylesheet" href="/css/style.css"
type="text/css" />');
/*slider function*/
$(document).ready(function()
{
$('.bxslider').bxSlider({
mode: 'fade',
captions: true,
auto:true
});
});

/* pop up signup form*/
function popup()
{
document.querySelector(".bg-model").style.display="flex";

}
/* close button function*/

122 | P a g e

$(document).ready(function()
{
$("#close").click(function()
{
$(".bg-model").css("display","none");
});
});
/*pop up login*/

$(document).ready(function()
{
$("#login").click(function()
{
$(".model-content").css("display","none");
$(".login-content").css("display","block");
});
});
/*pop up signup on login content*/
$(document).ready(function()
{
$("#signup").click(function()
{
$(".model-content").css("display","block");
$(".login-content").css("display","none");
});
});
/*close button on login-content*/

123 | P a g e

$(document).ready(function()
{
$("#close_login").click(function()

{
$(".bg-model").css("display","none");
});
});

/*========================Signup
validation========================*/
$(document).ready(function()

{
$("#msg").css("display","none");
$("#sign_btn").click(function ()

{
var v_name=$('#name').val();
var mbno=$('#m_num').val();
var pswd=$('#pass').val();
var cpswd=$('#cpas').val();
var name_regex = /^[a-zA-Z]+$/;
var mb_regex=/^(?:(?:\+|0{0,2})91(\s*[\-]\s*)?|[0]?)?[789]\d{9}$/;
if(v_name.length == 0)
{
$('#name').attr('placeholder',"*Please enter your name").css
({"opacity":"1","color":"red"});

124 | P a g e

$("#name").css({"border-bottom-color":"red","border-bottom-
style":"inset"});
return false;

}
else if(v_name.length<=5 || (!v_name.match(name_regex)))
{
alert("enter a valid name greater than 5 digit");
return false;
}
else if(mbno.length == 0)
{
$('#m_num').attr('placeholder',"* Please Enter your Mobile no").css
({"opacity":"1","color":"red"});
$("#m_num").css({"border-bottom-color":"red","border-bottom-
style":"inset"});
return false;

}
else if(!mbno.match(mb_regex))
{
alert("enter a valid mobel no");
return false;
}
else if(mbno.length == 0)
{
$('#m_num').attr('placeholder',"* Please Enter your Mobile no").css
({"opacity":"1","color":"red"});

125 | P a g e

$("#m_num").css({"border-bottom-color":"red","border-bottom-
style":"inset"});
return false;

}
else if(!mbno.match(mb_regex))
{
alert("enter a valid mobel no");
return false;
}
else if(pswd.length == 0 )
{
$('#pass').attr('placeholder',"* Please choose a password").css
({"opacity":"1","color":"red"});
$("#pass").css({"border-bottom-color":"red","border-bottom-
style":"inset"});
return false;

}
else if(pswd.length<6)
{
alert("enter password greater than 5 character");
return false;
}
else if(cpswd.length == 0 )
{
$('#cpas').attr('placeholder',"* Please confirm your password").css
({"opacity":"1","color":"red"});

126 | P a g e

$("#cpas").css({"border-bottom-color":"red","border-bottom-
style":"inset"});
return false;

}
else if(cpswd!=pswd)
{
alert("password does not match");
return false;
}
else
{
alert("registerdsuccefully");
return true;

}

});
$('input').click(function ()
{
$("input").css("color","grey");
$("input").css("border-bottom-color","grey");
});
});

127 | P a g e

Admin Pages

AdminLogin.jsp
<%--
Document : Adminlogin
Created on : Oct 21, 2018, 10:08:07 AM
Author : Priyanshu
--%>

<%@page import="com.hibernate.Myadmin"%>
<%@page import="java.util.List"%>
<%@page import="com.hibernate.EcomUser"%>
<%@page import="org.hibernate.Session"%>
<%@page import="org.hibernate.SessionFactory"%>
<%@page import="org.hibernate.cfg.Configuration"%>
<%@page import="org.hibernate.cfg.Configuration"%>
<%@page contentType="text/html" pageEncoding="UTF-8"
import="servelet.AdminDao;"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AdminLogin</title>
</head>
<body>
<%
try
{

128 | P a g e

String name=request.getParameter("name");
String pass=request.getParameter("pass");
if(AdminDao.checkUser(name, pass))
{
HttpSession hs=request.getSession();
hs.setAttribute("name", name);
response.sendRedirect("dashboard.jsp");
}
else
{
out.print("<div class='cont'><h3 style='color:white'>Invalid Details Try
Again....</h3></div>");
RequestDispatcher rs=request.getRequestDispatcher("adminform.jsp");
rs.include(request, response);
}
}
catch(Exception e)
{
e.printStackTrace();
}
%>

</body>
</html>

129 | P a g e

ProductUI.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="dasboard_arch.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Admin Panel</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.mi
n.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></s
cript>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.j
s"></script>
<script src="subcat.js">
</script>

<style>
h2
{
font-family: monospace;
}
#btn
{
font-size: 1.5em;
}

130 | P a g e

</style>
</head>
<body>
<div class="content">
<u><h2 align="center">Add a Product</h2></u>
<form action="pro_process.jsp" method="post" enctype="multipart/form-
data">
<table align="center">

<tr>
<td><label>Category:</label></td>
<td>
<select onchange="subcat_fun(this.value)" name="cat"
style="width:150px" class="form-control">
<option>----Select------</option>
<option>Electronics</option>
<option>Home and Appliances</option>
<option>Women's Fashion</option>
<option>Men's Fashion</option>

</select>
</td>
</tr>

<tr>
<td><label>SubCategory:</label></td>
<td>

131 | P a g e

<select name="subcat" onchange="brand_fun(this.value)" id="s_cat"
class="form-control" style="width:150px">
<option>First choose Category</option>

</select>
</td>
</tr>
<tr>
<td><label>Brand:</label></td>
<td>
<select name="brand" id="m_brand" class="form-control"
style="width:150px">
<option>First choose SubCategory</option>

</select>
</td>
</tr>
<tr>
<td><label>Product Description:</label></td>
<td><textarea class="form-control" aria-label="With textarea"
name="desc"></textarea></td>

</tr>
<tr>
<td><label>Price:</label></td>
<td><input type="text" name="price" class="form-control"></td>

</tr>

132 | P a g e

<tr>
<td><label>Product image:</label></td>
<td><input type="file" name="img" class="custom-file-input"></td>

</tr>
<tr>
<td></td><td> <input type="submit" id="btn" class="btn btn-info"
value="Save Product"></td>

</tr>

</table>
</form>

</div>

</body>
</html>

AdminForm.jsp

<html>
<head>
<title>Admin Login</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

133 | P a g e

<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.mi
n.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></s
cript>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.j
s"></script>
<link href="AdminStyle.css" rel="stylesheet" type="text/css">
</head>
<body style="background-image: url(image/bg-img.jpg)">

<div class="wrapper">
<div class="header">
<h1>Shoppers Admin panel </h1>
</div>

<div class="cont">
<form action="Adminlogin.jsp" method="post">
<h2>Admin Login</h2>
<img src="image/adminimage.jpg" height="80" width="100" alt=""/>
<table align="center">
<tr>
<td><label>Username:</label></td>
<td><input type="text" class="form-control" name="name"></td>
</tr><br>
<tr>
<td><label>Password:</label></td>

134 | P a g e

<td><input type="password" class="form-control" name="pass"></td>
</tr><br>
<tr><td> </td><td><input type="submit" style="border:none;" class="btn
btn-info" value="Login"></td></tr>
<tr><td><a href="##">Forgot Password?</a> </td><td></td></tr>
</table>
</form>
</div>
<div class="footer">
<footer><p>All Copyright &copy; Reserved Shoppers</p></footer>
</div>

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

SubcatList.jsp
<%--
Document : SubcatList
Created on : Oct 31, 2018, 12:25:47 PM
Author : Priyanshu
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%

String cat=request.getParameter("pro_cat");

135 | P a g e

String arr_elec[]={"Mobiles","TVs","Laptop","Mobile
Accesories","Washingmachine","Refigrator"};
String arr_home[]={"Beds","Tables","Sofas","home_decoration"};
String arr_mfashion[]={"Shirts","T-Shirts","Trousers","Shoes","Sports
Wear"};
String arr_w_fashion[]={"Suits","Leggings","Party Wear","Sports Wear"};

if(cat.equalsIgnoreCase("Electronices"))
{
for(String s:arr_elec)
out.print("<option>"+s+"</option>");


}

else if(cat.equalsIgnoreCase("Home and Appliances"))
{
for(String s:arr_home)
out.print("<option>"+s+"</option>");
}
else if(cat.equalsIgnoreCase("Women's Fashion"))
{
for(String s:arr_w_fashion)
out.print("<option>"+s+"</option>");
}
else if(cat.equalsIgnoreCase("Men's Fashion"))
{
for(String s:arr_mfashion)

136 | P a g e

out.print("<option>"+s+"</option>");
}


else
{
out.println("<option>Please select Category First</option>");
}

%>

Brand.jsp

<%--
Document : brand
Created on : Nov 2, 2018, 7:37:59 PM
Author : Priyanshu
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>

137 | P a g e

<%
String brand=request.getParameter("pro_subcat");
String arr_m[]={"Mi","Iphone","Samsung","Oppo","Lenove","Others"};
String arr_tv[]={"Sony","Samsung","Mi","LG"};
String arr_laptop[]={"Dell","Acer","Hp","Lenove","Others"};
String mobile_acces[]={"Headphone","neck Band","Memory
Card","PenDrive"};
String washing_machine[]={"IFB","LG","Haier","Others"};
String refigrator[]={"LG","Haier","Whirlpool"};
if(brand.equalsIgnoreCase("Mobiles"))
{
for(String br:arr_m)
{
out.print("<option>"+br+"</option>");
}
}
else if(brand.equalsIgnoreCase("Tvs"))
{
for(String br:arr_tv)
{
out.print("<option>"+br+"</option>");
}
}
else if(brand.equalsIgnoreCase("laptop"))
{
for(String br:arr_laptop)
{
out.print("<option>"+br+"</option>");

138 | P a g e

}
}
else if(brand.equalsIgnoreCase("mobile accesories"))
{
for(String br:mobile_acces)
{
out.print("<option>"+br+"</option>");
}
}
else if(brand.equalsIgnoreCase("washingmachine"))
{
for(String br:washing_machine)
{
out.print("<option>"+br+"</option>");
}
}
else if(brand.equalsIgnoreCase("refigrator"))
{
for(String br:refigrator)
{
out.print("<option>"+br+"</option>");
}
}
else
{
out.print("<option>select Above Field First</option>");
}

139 | P a g e

%>
</body>
</html>

Dashboard_arch.jsp

<%--
Document : dashboard
Created on : Oct 30, 2018, 12:03:04 PM
Author : Priyanshu
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Welcome To Dashboard</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.mi
n.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></s
cript>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.j
s"></script>
<link href="dashboard.css" rel="stylesheet" type="text/css">
<style>

140 | P a g e

.user
{
font-family: sans-serif;
font-size: 18px;
float:right;
margin-right: 20px;
margin-top:-45px;
}
.user a
{
text-decoration: none;
color:white;
}
</style>
</head>
<body >
<div class="wrapper">
<div class="header">
<div class="logo">
<span class="shoppers">SHOPPERS.</span><span
class="com">com</span>
</div>
<div class="user">
<%

HttpSession s=request.getSession(false);
String name=(String)s.getAttribute("name");
if(s!=null)

141 | P a g e

{
out.print("<b><span>");
out.print("Welcome: "+name);
out.print("</span></b>");
out.print("<br><b><a href='logout.jsp'>");
out.print("Logout");
out.print("</a></b>");
}
else
{
out.print("Error In Login Try Again.....");

response.sendRedirect("adminform.jsp");
}


%>
</div>
</div>
<div class="page_content">
<div class="nav">
<ul>
<li> <a href="ProductUI.jsp" class="btn btn-primary" role="button">Add
Product</a></li>
<li> <a href="viewproduct.jsp" class="btn btn-primary"
role="button">View Product</a></li>
<li> <a href="viewproduct.jsp" class="btn btn-primary" role="button">Edit
Product</a></li>

142 | P a g e

<li> <a href="viewproduct.jsp" class="btn btn-primary"
role="button">Delete product</a></li>
</ul>
</div>
<div class="content">

</div>
</div>
<div class="footer">
<footer><p>All Copyright &copy; Reserved Shoppers</p></footer>
</div>
</div>
</body>
</html>

Dashboard.jsp
<%--
Document : dashboard
Created on : Oct 30, 2018, 12:03:04 PM
Author : Priyanshu
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="dasboard_arch.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Welcome To Dashboard</title>

143 | P a g e

<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.mi
n.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></s
cript>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.j
s"></script>
<link href="dashboard.css" rel="stylesheet" type="text/css">
<style>
.user
{
font-family: sans-serif;
font-size: 18px;
float:right;
margin-right: 20px;
margin-top:-45px;
}
a
{
text-decoration: none;
color:white;
}
</style>
</head>
<body >
<div class="wrapper">

144 | P a g e


<div class="content">
<img src="image/ecommerce-1.jpg" alt=""/>
</div>
<div class="footer">
<footer><p>All Copyright &copy; Reserved Shoppers</p></footer>
</div>
</div>
</body>
</html>

ViewProduct.jsp

<%@page import="com.hibernate.Product"%>
<%@page import="java.util.List"%>
<%@page import="servelet.ProductDao"%>
<%@include file="dasboard_arch.jsp" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.mi
n.css">
<link rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">

145 | P a g e

<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></s
cript>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.j
s"></script>
<title>Products</title>

<style>

</style>
</head>
<body>

<%
List<Product> list=ProductDao.view();
out.print("<div class='viewcontent'>");
out.print("<u><h2 align='center'> Products.</h2></u>");
out.print("<table width='100%' class='table table-hover'>");
out.print("<tr><th>Pro_Id </th><th> Pro_Cat </th><th> Pro_subcat
</th><th> Pro_desc </th><th> Pro_price </th><th>
Pro_image</th><th>Edit</th><th>Delete</th></tr>");
for(Product p:list)
{
out.print("<tr><td>"+p.getProId()+"</td><td>"+p.getProCat()+"</td><td>"
+p.getProSubcat()+"</td><td>"+p.getProDesc()+"</td><td>"+p.getProPri
ce()+"</td><td><img src='..\\imageupload\\"+p.getProImage()+"'
height='50px' width='25px'><td><a
href='pro_edit.jsp?pro_id="+p.getProId()+"' class='glyphicon glyphicon-
edit'>edit</a></td><td><a href='pro_del.jsp?id="+p.getProId()+"'
class='fas fa-archive'>delete</a></td></tr>");

146 | P a g e

}
out.print("</table>");
out.print("</div>");
%>
</body>
</html>

Pro_process.jsp

<%@page import="java.util.Enumeration"%>
<%@page import="com.oreilly.servlet.MultipartRequest"%>
<%@page import="servelet.ProductDao"%>
<%@page import="java.math.BigDecimal"%>
<%@page import="org.hibernate.Transaction"%>
<%@page import="org.hibernate.Session"%>
<%@page import="org.hibernate.SessionFactory"%>
<%@page import="org.hibernate.cfg.Configuration"%>
<%@page import="com.hibernate.Product"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%

147 | P a g e


try
{


String root=getServletContext().getRealPath("/imageupload");
MultipartRequest mr=new MultipartRequest(request, root);
String p_cate=mr.getParameter("cat");
String p_subcate=mr.getParameter("subcat");
String p_desc=mr.getParameter("desc");
String p_price=mr.getParameter("price");
String p_brand=mr.getParameter("brand");
Enumeration files=mr.getFileNames();
String f_name=(String)files.nextElement();

String fileName=mr.getFilesystemName(f_name);
/* Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
Transaction t=s.beginTransaction();
Product p=new Product(p_cate,p_subcate,p_desc,p_price,p_img);
s.persist(p);
t.commit();
out.println("data inserted succesfully");
s.close();
*/

148 | P a g e

Product p=new
Product(p_cate,p_subcate,p_desc,p_price,fileName,p_brand);
ProductDao.save(p);
out.println("<h1>Product added succesfully</h1>");
out.println("<a href='viewproduct.jsp'>View Product</a>");
out.println("<a href='ProductUI.jsp'>Add More product</a>");
}

catch(Exception e)
{
out.print(e);
}

%>
</body>
</html>
Pro_del.jsp
<%--
Document : pro_del
Created on : Oct 26, 2018, 10:18:36 PM
Author : Priyanshu
--%>

<%@page import="org.hibernate.Transaction"%>
<%@page import="org.hibernate.Session"%>
<%@page import="org.hibernate.SessionFactory"%>
<%@page import="org.hibernate.cfg.Configuration"%>
<%@page import="com.hibernate.Product"%>

149 | P a g e

<%@page import="servelet.ProductDao"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%

try{
int i=Integer.parseInt(request.getParameter("id"));
/* Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
Product p = new Product();
p.setProId(i);
Transaction tx = s.beginTransaction();
s.delete(p);
tx.commit();
out.println("deleted succesfully");
s.close();*/
ProductDao.delete(i);
response.sendRedirect("viewproduct.jsp");
}

150 | P a g e

catch(Exception e)
{
e.printStackTrace();
}
%>
</body>
</html>
Pro_edit.jsp
<%--
Document : pro_edit
Created on : Oct 28, 2018, 7:16:32 PM
Author : Priyanshu
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@page import="org.hibernate.Query"%>
<%@page import="org.hibernate.Transaction"%>
<%@page import="org.hibernate.Session"%>
<%@page import="org.hibernate.SessionFactory"%>
<%@page import="org.hibernate.cfg.Configuration"%>
<%@page import="servelet.ProductDao"%>
<%@page import="com.hibernate.Product" %>
<%@include file="dasboard_arch.jsp" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

151 | P a g e

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.mi
n.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></s
cript>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.j
s"></script>
<script src="subcat.js"></script>
<style>
#savebtn
{
font-size: 1.5em;
}
</style>
</head>
<body>
<%
try
{
String sid=request.getParameter("pro_id");
int id=Integer.parseInt(sid);
Product p=ProductDao.viewById(id);
out.print("<div class='content'>");

152 | P a g e

out.print("<u><h2 align='center'>Update Product</h2></u>");
out.print("<form action='pro_editView.jsp' method='post'>");
out.print("<table>");
out.print("<tr><td></td><td><input type='hidden' name='id'
value='"+p.getProId()+"'/></td></tr>");
//out.print("<tr><td>Pro_Category:</td><td><input type='text'
name='procat' value='"+p.getProCat()+"'/></td></tr>");
out.print("<tr><td><label>Pro_Category:</label></td><td>");
out.print("<select name='procat'onchange='subcat_fun(this.value)'
class='form-control' value='"+p.getProCat()+"'>");
out.print("<option>Electronices</option>");
out.print("<option>Men's Fashion</option>");
out.print("<option>Women's Fashion</option>");
out.print("<option>Home and Appliances</option>");
out.print("</select>");
out.print("</td></tr>");

out.print("<tr><td><label>Sub_Category:</label></td><td>");
out.print("<select name='prosubcat' onchange='brand_fun(this.value)'
id='s_cat' class='form-control' value='"+p.getProCat()+"'>");
out.print("<option>First choose Category</option>");

out.print("</select>");
out.print("</td></tr>");
out.print("<tr>");
out.print("<td><label>Brand:</label></td>");
out.print("<td>");
out.print("<select name='brand' id='m_brand' class='form-control'
style='width:150px'>");

153 | P a g e

out.print("<option>First choose SubCategory</option>");
out.print("</select>");
out.print("</td>");
out.print("</tr>");
out.print("<tr><td><label>Pro_Description:</label></td> <td><textarea
class='form-control' aria-label='With textarea' name='prodesc'
value='"+p.getProDesc()+"'/></textarea></td></tr>");
out.print("<tr><td><label>Pro_Price:</label></td><td><input type='text'
class='form-control' name='proprice'
value='"+p.getProPrice()+"'/></td></tr>");
out.print("<tr><td><label>Pro_Image:</label></td><td><input type='file'
class='custom-file-input' name='proimage' value='"+p.getProImage()+"'/>
</td></tr>");
out.print("<tr><td></td><td colspan='2'><input type='submit' id='savebtn'
class='btn btn-info' value='Edit & Save '/></td></tr>");
out.print("</table>");
out.print("</form>");
out.print("</div>");
}
catch(Exception e)
{
e.printStackTrace();
}

out.close();
%>
</body>
</html>

154 | P a g e

Logout.jsp
<%--
Document : logout
Created on : Oct 31, 2018, 11:26:43 AM
Author : Priyanshu
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-
8">
<title>JSP Page</title>
</head>
<body>
<%
HttpSession s=request.getSession(false);
s.invalidate();
out.println("<h1>Logged Out Succesfully</h1>");

out.println("<a href='adminform.jsp'>Login Again</a>");
%>
</body>
</html>

155 | P a g e

Admin CSS

AdminStyle.css
*
{
margin: 0px;
padding: 0px;
}
.wrapper
{
height:auto;
width: 100%;
}
.header
{
height:15%;
padding-top: 20px;
width: 100%;
background-color: #3396FF;
color:white;
text-align: center;
}
.cont
{
float: right;
border-radius: 10px;
background-color: #008ae6;

156 | P a g e

margin-top: 30px;
width:40%;
text-align: center;
margin-right: 30%;
height: auto;

}
.cont h2
{
font-family: sans-serif;
color:black;
}
.cont img
{
margin-top: 5px;
border-radius: 50px;
}
.cont table{

font-size: 1.5em;

}
.cont input
{
line-height: 15px;
margin-bottom: 10px;
font-size: 1em;

157 | P a g e

}
.cont a
{
text-decoration: none;
color: #000099;
float: right;
font-size: medium;
}
.cont label
{
color:white;
}
.footer
{
position: fixed;
left: 0;
bottom: 10px;
width: 100%;
height: 30px;
padding-top: 25px;
background-color:#3396FF;
color: white;
text-align: center;
}
.footer p
{
position: fixed;

158 | P a g e

bottom: 10px;
}

Dashboard.jsp
*
{
margin: 0px;
padding: 0px;
}
body
{
margin: 0px;
padding: 0px;
}
.wrapper
{
width:100%;
height:auto;
}

.header
{

height:auto;
width:100%;
padding: 5px;
background-color:#3377FF;

159 | P a g e

float: left;
z-index: 1;
}

.logo
{
width: 23%;
}
.shoppers
{
color:#fff;
font-size:3em;
font-weight: bold;
margin-left: 15px;
font-family: cursive;
}
.com
{
color:#FFE033;
font-size:180%;
font-weight: bold;
font-family:serif;

}
.page_content
{
height: auto;

160 | P a g e

width: 100%;

}
.nav
{
display: block;
width: 30%;
height: auto;
background-color: ghostwhite;
}
.nav a
{
border:none;
margin-top: 50px;
text-decoration: none;
font-size: large;
line-height:2.5em;
font-size: 1.5em;
}
.content
{
height:auto;
width: 68%;
float: right;
margin-top: -460px;
margin-right: 5px;
}

161 | P a g e

.content img
{
height: 500px;
width: 100%;
}

.footer
{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 70px;
padding-top: 25px;
background-color:#3396FF;
color: white;
text-align: center;
}

.content table
{
margin-left: 30%;
margin-top: 40px;
}
.content label
{
font-size: large;

162 | P a g e

align-items: flex-end;
}
.pro_content
{
text-align: center;
}
.content input
{

margin-bottom: 20px;
}
.content textArea
{

margin-bottom: 20px;
}
.content select
{
margin-bottom: 20px;
}
.viewcontent
{
height:auto;
width: 70%;
float: right;
margin-top: -460px;
}

163 | P a g e

Admin Side JavaScript
Subcat.js

function subcat_fun(str)
{
var req=new XMLHttpRequest();
req.open("get","http://localhost:35080/E-
commerce/Admin/SubcatList.jsp?pro_cat="+str,true);
req.send();
req.onreadystatechange=function()
{
if(req.readyState==4 && req.status==200)
{
document.getElementById("s_cat").innerHTML=req.responseText;
}
};
}
function brand_fun(brand)
{
var req=new XMLHttpRequest();
req.open("get","http://localhost:35080/E-
commerce/Admin/brand.jsp?pro_subcat="+brand,true);
req.send();
req.onreadystatechange=function()
{
if(req.readyState==4 && req.status==200)
{
docume nt.getElementById("m_brand").innerHTML=req.responseText;

164 | P a g e

}
};;

}


Hibernate Cofiguration File
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate
Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-
configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property
name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
<property
name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</pr
operty>
<property
name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:XE</
property>
<property name="hibernate.connection.username">hr</property>
<property name="hibernate.connection.password">hr</property>
<mapping resource="com/hibernate/EcomUser.hbm.xml"/>
<mapping resource="com/hibernate/Myadmin.hbm.xml"/>
<mapping resource="com/hibernate/Product.hbm.xml"/>
<mapping resource="com/hibernate/Userorder.hbm.xml"/>
</session-factory>
</hibernate-configuration>

165 | P a g e

Hibernate Reverse Engineering Files

Hibernate.reveng.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-
//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-reverse-engineering-
3.0.dtd">
<hibernate-reverse-engineering>
<schema-selection match-schema="HR"/>
<table-filter match-name="ECOM_USER"/>
</hibernate-reverse-engineering>

Order.reveng.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-
//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-reverse-engineering-
3.0.dtd">
<hibernate-reverse-engineering>
<schema-selection match-schema="HR"/>
<table-filter match-name="USERORDER"/>
</hibernate-reverse-engineering>

Product.reveng.xml

<?xml version="1.0" encoding="UTF-8"?>

166 | P a g e

<!DOCTYPE hibernate-reverse-engineering PUBLIC "-
//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-reverse-engineering-
3.0.dtd">

<hibernate-reverse-engineering>
<schema-selection match-schema="HR"/>
<table-filter match-name="PRODUCT"/>
</hibernate-reverse-engineering>

Admin.reveng.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-
//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-reverse-engineering-
3.0.dtd">
<hibernate-reverse-engineering>
<schema-selection match-schema="HR"/>
<table-filter match-name="MYADMIN"/>
</hibernate-reverse-engineering>

167 | P a g e

Hibernate Mapping files

EcomUser.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate
Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<!-- Generated Nov 9, 2018 3:57:22 PM by Hibernate Tools 4.3.1 -->
<hibernate-mapping>
<class name="com.hibernate.EcomUser" table="ECOM_USER"
schema="HR">
<id name="id" type="long">
<column name="ID" precision="10" scale="0" />
<generator class="assigned"></generator>
</id>
<property name="name" type="string">
<column name="NAME" length="30" not-null="true" />
</property>
<property name="mobile" type="long">
<column name="MOBILE" precision="10" scale="0" not-null="true" />
</property>
<property name="password" type="string">
<column name="PASSWORD" length="30" not-null="true" />
</property>
</class>
</hibernate-mapping>

168 | P a g e

Myadmin.hbm.xml

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate
Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<!-- Generated Nov 9, 2018 3:57:22 PM by Hibernate Tools 4.3.1 -->
<hibernate-mapping>
<class name="com.hibernate.Myadmin" table="MYADMIN"
schema="HR">
<id name="id" type="long">
<column name="ID" precision="10" scale="0" />
<generator class="assigned"></generator>
</id>
<property name="username" type="string">
<column name="USERNAME" length="30" not-null="true" />
</property>
<property name="password" type="string">
<column name="PASSWORD" length="30" not-null="true" />
</property>
</class>
</hibernate-mapping>

Product.hbm.xml

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate
Mapping DTD 3.0//EN"

169 | P a g e

"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<!-- Generated Nov 9, 2018 3:57:22 PM by Hibernate Tools 4.3.1 -->
<hibernate-mapping>
<class name="com.hibernate.Product" table="PRODUCT"
schema="HR">
<id name="proId" type="long">
<column name="PRO_ID" precision="10" scale="0" />
<generator class="assigned"></generator>
</id>
<property name="proCat" type="string">
<column name="PRO_CAT" length="30" not-null="true" />
</property>
<property name="proSubcat" type="string">
<column name="PRO_SUBCAT" length="30" not-null="true" />
</property>
<property name="proDesc" type="string">
<column name="PRO_DESC" length="100" not-null="true" />
</property>
<property name="proPrice" type="string">
<column name="PRO_PRICE" length="30" not-null="true" />
</property>
<property name="proImage" type="string">
<column name="PRO_IMAGE" length="4000" />
</property>
<property name="proBrand" type="string">
<column name="PRO_BRAND" length="45" />
</property>
</class>

170 | P a g e

</hibernate-mapping>

Userorder.hbm.xml

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate
Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<!-- Generated Nov 9, 2018 3:57:22 PM by Hibernate Tools 4.3.1 -->
<hibernate-mapping>
<class name="com.hibernate.Userorder" table="USERORDER"
schema="HR" optimistic-lock="version">
<id name="orderId" type="long">
<column name="ORDER_ID" precision="10" scale="0" />
<generator class="assigned" />
</id>
<property name="orderName" type="string">
<column name="ORDER_NAME" length="30" not-null="true" />
</property>
<property name="orderDate" type="date">
<column name="ORDER_DATE" length="7" not-null="true" />
</property>
<property name="orderBy" type="string">
<column name="ORDER_BY" length="30" not-null="true" />
</property>
<property name="email" type="string">
<column name="EMAIL" length="4000" not-null="true" />
</property>

171 | P a g e

<property name="address" type="string">
<column name="ADDRESS" length="4000" not-null="true" />
</property>
</class>
</hibernate-mapping>

172 | P a g e







JAVA BEANS

173 | P a g e

EcomUser.java
package com.hibernate;

public class EcomUser implements java.io.Serializable {


private long id;
private String name;
private long mobile;
private String password;

public EcomUser() {
}

public EcomUser(long id, String name, long mobile, String password) {
this.id = id;
this.name = name;
this.mobile = mobile;
this.password = password;
}
public EcomUser( String name, long mobile, String password) {

this.name = name;
this.mobile = mobile;
this.password = password;
}

174 | P a g e

public long getId() {
return this.id;
}

public void setId(long id) {
this.id = id;
}
public String getName() {
return this.name;
}

public void setName(String name) {
this.name = name;
}
public long getMobile() {
return this.mobile;
}

public void setMobile(long mobile) {
this.mobile = mobile;
}
public String getPassword() {
return this.password;
}

public void setPassword(String password) {
this.password = password;

175 | P a g e

}
}

MyAdmin.java
package com.hibernate;
public class Myadmin implements java.io.Serializable
{
private long id;
private String username;
private String password;
public Myadmin()
{
}
public Myadmin(long id, String username, String password)
{
this.id = id;
this.username = username;
this.password = password;
}

public long getId() {
return this.id;
}

public void setId(long id) {
this.id = id;
}

176 | P a g e

public String getUsername() {
return this.username;
}

public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return this.password;
}

public void setPassword(String password) {
this.password = password;
}
}

Product.java
package com.hibernate;
public class Product implements java.io.Serializable
{
private long proId;
private String proCat;
private String proSubcat;
private String proDesc;
private String proPrice;
private String proImage;
private String proBrand;

177 | P a g e


public Product()
{
}
public Product(long proId, String proCat, String proSubcat, String
proDesc, String proPrice)
{
this.proId = proId;
this.proCat = proCat;
this.proSubcat = proSubcat;
this.proDesc = proDesc;
this.proPrice = proPrice;
}
public Product(long proId, String proCat, String proSubcat, String
proDesc, String proPrice, String proImage, String proBrand) {
this.proId = proId;
this.proCat = proCat;
this.proSubcat = proSubcat;
this.proDesc = proDesc;
this.proPrice = proPrice;
this.proImage = proImage;
this.proBrand = proBrand;
}
public Product(String proCat, String proSubcat, String proDesc, String
proPrice, String proImage, String proBrand) {

this.proCat = proCat;
this.proSubcat = proSubcat;

178 | P a g e

this.proDesc = proDesc;
this.proPrice = proPrice;
this.proImage = proImage;
this.proBrand = proBrand;
}

public long getProId() {
return this.proId;
}

public void setProId(long proId) {
this.proId = proId;
}
public String getProCat() {
return this.proCat;
}

public void setProCat(String proCat) {
this.proCat = proCat;
}
public String getProSubcat() {
return this.proSubcat;
}

public void setProSubcat(String proSubcat) {
this.proSubcat = proSubcat;
}

179 | P a g e

public String getProDesc() {
return this.proDesc;
}

public void setProDesc(String proDesc) {
this.proDesc = proDesc;
}
public String getProPrice() {
return this.proPrice;
}

public void setProPrice(String proPrice) {
this.proPrice = proPrice;
}
public String getProImage() {
return this.proImage;
}

public void setProImage(String proImage) {
this.proImage = proImage;
}
public String getProBrand() {
return this.proBrand;
}

public void setProBrand(String proBrand) {
this.proBrand = proBrand } }

180 | P a g e

UserOrder.java
package com.hibernate;
import java.util.Date;
public class Userorder implements java.io.Serializable
{
private String email;
private long orderId;
private String orderName;
private Date orderDate;
private String orderBy;
private String address;

public void setAddress(String address) {
this.address = address;
}

public String getAddress() {
return address;
}

public Userorder() {
}

public Userorder(long orderId, String orderName, Date orderDate,
String orderBy) {
this.orderId = orderId;
this.orderName = orderName;
this.orderDate = orderDate;

181 | P a g e

this.orderBy = orderBy;
}
public Userorder(String orderName, Date orderDate, String
orderBy,String email,String address)
{

this.orderName = orderName;
this.orderDate = orderDate;
this.orderBy = orderBy;
this.address=address;
this.email=email;
}

public void setEmail(String email) {
this.email = email;
}

public String getEmail() {
return email;
}

public long getOrderId() {
return this.orderId;
}

public void setOrderId(long orderId) {
this.orderId = orderId;
}

182 | P a g e

public String getOrderName() {
return this.orderName;
}

public void setOrderName(String orderName) {
this.orderName = orderName;
}
public Date getOrderDate() {
return this.orderDate;
}

public void setOrderDate(Date orderDate) {
this.orderDate = orderDate;
}
public String getOrderBy() {
return this.orderBy;
}
public void setOrderBy(String orderBy) {
this.orderBy = orderBy;
}
}

183 | P a g e







DAO

184 | P a g e

Connectivity.java
import com.hibernate.EcomUser;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;


public class Connectivity extends HttpServlet
{



protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
PrintWriter out=response.getWriter();
response.setContentType("text/html");

try
{

185 | P a g e

String name=request.getParameter("n");
String pass=request.getParameter("pas");
long mobile=Long.parseLong(request.getParameter("mb"));
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
Transaction t=s.beginTransaction();
EcomUser i=new EcomUser(name,mobile,pass);
s.persist(i);
t.commit();

request.getRequestDispatcher("/index.html").include(request,
response);
out.println("Registered succes");
s.close();


}
catch(Exception e)
{
out.println(e);
}
}
@Override
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {

186 | P a g e

processRequest(request, response);
}
@Override
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
@Override
public String getServletInfo() {
return "Short description";
}

}



AdminDao.java
package servelet;
import com.hibernate.Myadmin;
import static java.lang.System.out;
import java.util.List;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
public class AdminDao
{
public static boolean checkUser(String uname,String password)

187 | P a g e

{
boolean b=false;
try
{
Session s=null;
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
s=sf.openSession();
List<Myadmin> l=s.createQuery("from Myadmin ma where
ma.username='"+uname+"' and ma.password='"+password+"'").list();

if(l!=null && l.size()>0)
{
return true;
}
s.close();
}
catch(Exception e)
{

out.print("Exception"+e);
}
return b;
}
}

188 | P a g e

OrderDao.java

package servelet;
import com.hibernate.Product;
import com.hibernate.Userorder;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;

/**
*
* @author Priyanshu
*/
public class OrderDao
{
public static int save(Userorder o)
{
int status=0;
try
{
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
Transaction t=s.beginTransaction();

189 | P a g e

o=new
Userorder(o.getOrderName(),o.getOrderDate(),o.getOrderBy(),o.getEma
il(),o.getAddress());
s.persist(o);
t.commit();
s.close();
}
catch(Exception e)
{
System. out.print(e);
}
return status;
}

}

ProductDao.java

package servelet;
import java.util.List;
import com.hibernate.Product;
import java.util.ArrayList;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;

190 | P a g e


public class ProductDao
{
public static int save(Product p)
{
int status=0;
try
{
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
Transaction t=s.beginTransaction();
p=new
Product(p.getProCat(),p.getProSubcat(),p.getProDesc(),p.getProPrice(),
p.getProImage(),p.getProBrand());
s.persist(p);
t.commit();
s.close();
}
catch(Exception e)
{
System. out.print(e);
}
return status;
}
public static List<Product> view()
{

191 | P a g e

List <Product> l=new ArrayList();
try
{
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
l=s.createQuery(" from Product order by pro_id").list();
for(Product row:l)
{
row.setProId(row.getProId());
row.setProCat(row.getProCat());
row.setProSubcat(row.getProSubcat());
row.setProDesc(row.getProDesc());
row.setProPrice(row.getProPrice());
row.setProImage(row.getProImage());
l.add(row);
}
s.close();
}
catch(Exception e)
{
e.printStackTrace();
}
return l;
}
public static int delete(int id){

192 | P a g e

int status=0;
try{
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
Product p = new Product();
p.setProId(id);
Transaction tx = s.beginTransaction();
s.delete(p);
tx.commit();
s.close();

}
catch(Exception e)
{
e.printStackTrace();
}

return status;
}
public static void update(Product p)
{
try{
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();

193 | P a g e

Session s=sf.openSession();
p.setProId(p.getProId());
p.setProCat(p.getProCat());
p.setProSubcat(p.getProSubcat());
p.setProDesc(p.getProDesc());
p.setProPrice(p.getProPrice());
p.setProImage(p.getProImage());
Transaction txn=s.beginTransaction();
s.update(p);
txn.commit();
s.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
public static Product viewById(int id)
{
Product p=new Product();

try
{
List<Product> ls=new ArrayList();
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();

194 | P a g e

Session s=sf.openSession();
ls=s.createQuery("from Product where proId='"+id+"'").list();
for(Product row:ls)
{

p.setProId(row.getProId());
p.setProCat(row.getProCat());
p.setProSubcat(row.getProSubcat());
p.setProDesc(row.getProDesc());
p.setProPrice(row.getProPrice());
p.setProImage(row.getProImage());
ls.add(p);
}
s.close();
return p;
}

catch(Exception ex)
{
ex.printStackTrace();
}

return p;
}
public static List<Product> viewByBrand(String str)
{
List <Product> l=new ArrayList();

195 | P a g e

try
{
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
l=s.createQuery(" from Product where
proBrand='"+str+"'").list();
for(Product row:l)
{
row.setProId(row.getProId());
row.setProCat(row.getProCat());
row.setProSubcat(row.getProSubcat());
row.setProDesc(row.getProDesc());
row.setProPrice(row.getProPrice());
row.setProImage(row.getProImage());
l.add(row);
}
s.close();
}
catch(Exception e)
{
e.printStackTrace();
}
return l;
}
}

196 | P a g e

sendMail.java
package servelet;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class sendMail
{
public static void send(String to,String sub,String msg,String
user,String pass)
{
Properties prop=new Properties();
prop.put("mail.smtp.host","smtp.gmail.com");
prop.put("mail.smtp.port","587");
prop.put("mail.smtp.auth","true");
prop.put("mail.smtp.starttls.enable","true");
Session ses=Session.getInstance(prop,new
javax.mail.Authenticator()
{
protected PasswordAuthentication
getPasswordAuthentication()
{
return new PasswordAuthentication(user,pass);
}
});

197 | P a g e

try
{
MimeMessage mesg=new MimeMessage(ses);
mesg.setFrom(new InternetAddress(user));
mesg.addRecipient(Message.RecipientType.TO,new
InternetAddress(to));
mesg.setSubject(sub);
mesg.setText(msg);
Transport.send(mesg);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}

198 | P a g e

Validate.java


package servelet;
import com.hibernate.EcomUser;
import static java.lang.System.out;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;


public class validate
{
public static boolean checkUser(String un,String password)
{
boolean b=false;
try
{
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
List<EcomUser> l=s.createQuery("from EcomUser eu where
eu.name='"+un+"' and eu.password='"+password+"'").list();

199 | P a g e

if(l!=null && l.size()>0)
{
return true;
}
s.close();
}
catch(Exception e)
{
out.print(e);
}
return b;
}
public static String name(long no)
{
EcomUser eu=new EcomUser();

List<EcomUser> ls=new ArrayList<>();
try
{
Configuration cfg=new Configuration();
cfg.configure("hibernate.cfg.xml");
SessionFactory sf=cfg.buildSessionFactory();
Session s=sf.openSession();
ls=s.createQuery("SELECT E.name from EcomUser E WHERE
E.mobile='"+no+"'").list();
for(EcomUser row:ls)
{
eu.setName(row.getName());

200 | P a g e

ls.add(eu);
}
return eu.getName();
}
catch(Exception e)
{
e.printStackTrace();
}
return eu.getName();
}
}

201 | P a g e


RESULT

In general, today’s businesses must always strive to create the next best thing that
consumers will want because consumers continue to desire their equal products,
services etc. to continuously be better, faster and cheaper. In this world of new
technology, businesses need to accommodate to the new types of consumer needs
and trends because it will prove to be vital to their business success and survival. E-
Commerce is continuously progressing and is becoming more and more important to
businesses as technology continues to advance and is something that should be
taken advantage of and implemented.
From the inception of the Internet and e-commerce, the possibilities have, become
endless for both businesses and consumers. Creating more opportunities for profit
and advancements for businesses, while creating more options for consumer.
However, just like anything else, e-commerce has its disadvantages including
consumer uncertainties, but nothing that cannot be resolved or avoided by good
decision making and business practices.
There are several factors and variables that need to be considered and decided
upon when starting an e-commerce business. Some of these include: types of e-
commerce, marketing strategies, and countless more. If the correct methods and
practices are followed, a business will prosper in an e-commerce setting with much
success and profitability.

202 | P a g e




FUTURE SCOPE AND CONCLUSIONS



E-Commerce is here to stay:
 Social Media
Majority of online buying decisions are made on social media. Social network
like Facebook, LinkedIn Twitter, Google+, Pinterest etc. have become a
medium for easy log-in and purchase. Moreover, the clients can
 Drone Delivery
 App Only Approach
 Artificial Intelligence

REFRENCES

 https://www.w3schools.com/
 https://www.wikipedia.org/
 https://www.lucidchart.com/
 https://stackoverflow.com/
Tags