Sie sind auf Seite 1von 56

1.

INTRODUCTION

E-commerce is fast gaining ground as an accepted and used business paradigm. More and
more business houses are implementing web sites providing functionality for performing
commercial transactions over the web. It is reasonable to say that the process of ordering on the
web is becoming common place. The objective of this project is to develop a general purpose e-
commerce store where any product (such as Amul, Natural etc.) can be bought from the comfort
of home through the Internet. However, for implementation purposes, this paper will deal with
an online Ice-Cream Parlor. The Ice-Cream Parlor is a virtual store on the Internet where
customers can browse the catalogue and select products of interest. The selected items may be
collected in an ordering cart. At checkout time, the items in the ordering cart will be presented as
an order. At that time, more information will be needed to complete the transaction. Usually, the
customer will be asked to fill or select a billing address, a shipping address, a shipping option,
and payment information such as Cash on Delivery and then bill is displayed to the user. The
Ice-Cream Parlors expanded permanently through new products and services in order to offer a
product portfolio corresponding to the market. Private customer and business customers can
order the selected products of the Ice-Cream Parlor service online quickly and comfortably. The
online Ice-Cream Parlor needs to sell different types of products to customer living in any part of
the world. The website will show all products in categorized manner. Customer can browse any
product for its price and other details and can order the product. Orders need to accompany with
shipping & billing details. Customer has to pay order amount. Products can be managed by
operators from admin panel. Operator can be created by admin. Admin can keep track of orders
through admin panel.
2. SYSTEM STUDY

2.1 Project Description


Ice-cream Parlor is a very important feature used in e-commerce to assist people making
purchases online, similar to the US English term ordering cart. The business-to-consumer aspect
of electronic commerce (e-commerce) is the most visible business use of the World Wide Web.
The objective of Online Ice-cream Parlor is to develop a general purpose e-commerce store
where any ice-cream (such as Chocolate, Vanilla etc.) can be bought from the comfort of home.
In order to facilitate online purchase a ordering cart is provided to the user. Private customer and
business customers can order the selected products of the ice-cream Parlor Service online
quickly and comfortably. The Ice-Cream Parlor is a virtual store on the Internet where customers
can browse the catalogue and select products of interest. The selected items may be collected in
an ordering cart. At checkout time, the items in the ordering cart will be presented as an order. At
that time, more information will be needed to complete the transaction. Usually, the customer
will be asked to fill or select a billing address, a shipping address, a shipping option, and
payment information such as Cash on Delivery and then bill is displayed to the user. Thus this
process is used for the vendors to buy the ice cream from the store where any ice-cream (such as
Chocolate, Vanilla etc.) can be bought from the comfort of home. It provides the user with a
catalogue of different types of ice-creams available for purchase in the store. In order to facilitate
online purchase an ordering cart is provided to the user. This project has been developed to allow
business grows larger and faster. This site will let customers to view and ordered products online
from any part of the world. Under this website many products can be ordered. Users of the
system: vendor is the user of the system. An administrator of the website is the super user.
2.1.1 Existing system

This process is done manually. The existing system is time consuming and it is very costly,
because it involves a lot of paperwork. User has to directly visit the ice cream parlor to buy ice
creams. Such, it seems to be uncomfortable for the user. To manually handle such a system was
very difficult task. But now-a-days because of computerization this job is becoming easier
Disadvantages

 The existing system is manual system. Needs to be converted into automated system.
 Risk of mismanagement of data.
 Less Security.
 No proper coordination between different Applications and Users.
 Fewer Users - Friendly.
 Accuracy not guaranteed.
 Not in reach of distant users.
2.1.2 Proposed System

To reduce the inconvenience that were found in the current system, it has been automated
so as to provide a user friendly GUI that will help data entry. This also includes Member
registration and Comment. A database is implemented to maintain all the data of the ice cream
parlor in a database system called MySQL. The developed system will be a Time saving
application for the user. User or visitor can get a broad view about the handset which they
require.

Advantages

 Accuracy and Reliability User-friendly , robust


 Security of data and Integration of all functions in to one system
 Remove redundancy and in-consistency
 Through proper validation, data inconsistency is reduced
 The proposed system would reduce the man-power, because a single trained
 person (Administrator) can handle whole database
2.2 Requirement Analysis
2.2.1 Hardware Requirements
 Processor : Dual core processor 2.6.0 GHz
 RAM : 1GB
 Hard disk : 160 GB
 Compact Disk : 650 MB
 Keyboard : Standard keyboard
 Monitor : 15 inch color monitor

2.2.2 Software Requirements


 Front End : JSP
 IDE : windows 7
 Back End : My SQL
3. SYSTEM DESIGN

3.1 Logical design

3.1.1 Data Flow Diagram

A two-dimensional diagram explains how data is processed and transferred in a system.


The graphical depiction identifies each source of data and how it interacts with other data
sources to reach a common output. Individuals seeking to draft a data flow diagram must identify
external inputs and outputs, determine how the inputs and outputs relate to each other, and
explain with graphics how these connections relate and what they result in. This type of diagram
helps business development and design teams visualize how data is processed and identify or
improve certain aspects.
Data flow Symbols

Symbol Description

An entity. A source of data or a destination


for data.

A process or task that is performed by the


system.

A data store, a place where data is held


between processes.

A data flow.
LEVEL 0

DFD Level 0 is also called a Context Diagram. It’s a basic overview of the whole system
or process being analyzed or modeled. It’s designed to be an at-a-glance view, showing the
system as a single high-level process, with its relationship to external entities. It should be easily
understood by a wide audience, including stakeholders, business analysts, data analysts and
developers.

Ice cream
management
Admin Vendor
system

Database

Fig 3.1.1 Level 0 Diagram

LEVEL 1

DFD Level 1 provides a more detailed breakout of pieces of the Context Level Diagram.
You will highlight the main functions carried out by the system, as you break down the high-
level process of the Context Diagram into its sub – processes.
1.0
Details database
Vendor
Register

2.0
Admin
Login

3.0

Add Product details database


products

4.0

Purchase

Fig 3.1.2 Level 1 Diagram


3.2 Program Design

A system architecture or systems architecture is the conceptual model that defines the
structure, behavior, and more views of a system. An architecture description is a formal
description and representation of a system, organized in a way that supports reasoning about the
structures and behaviors of the system. System architecture can comprise system components,
the externally visible properties of those components, the relationships (e.g. the behavior)
between them. It can provide a plan from which products can be procured, and systems
developed, that will work together to implement the overall system. There have been efforts to
formalize languages to describe system architecture; collectively these are called architecture
description languages (ADLs).

Various organizations define systems architecture in different ways, including:

 An allocated arrangement of physical elements which provides the design solution for a
consumer product or life-cycle process intended to satisfy the requirements of the
functional architecture and the requirements baseline.
 Architecture comprises the most important, pervasive, top-level, strategic inventions,
decisions, and their associated rationales about the overall structure (i.e., essential
elements and their relationships) and associated characteristics and behavior.
 If documented, it may include information such as a detailed inventory of current
hardware, software and networking capabilities; a description of long-range plans and
priorities for future purchases, and a plan for upgrading and/or replacing dated equipment
and software.

An architecture diagram is a graphical representation of a set of concepts that are part of


architecture, including their principles, elements and components. Architecture diagram can help
system designers and developers visualize the high-level, overall structure of their system or
application, in order to ensure the system meets their users' needs. Using architecture diagram,
you can also describe patterns that are used throughout the design. It's somewhat like a blueprint
that you use as a guide, so that you and your colleagues can discuss, improve and follow.
View product

Add product
Customer
Admin Database

Purchase product

Fig 3.2.1 Program Design


4. SYSTEM DEVELOPMENT

4.1 Program Development


4.1.1 Modules
 Registration
 Login
 Add product
 View product
 Purchase product

4.1.2 Modules Description

Registration

In registration module, the vendor will register their details. The registered details will be
stored in a database. The vendor will enter their name, email, address etc. Thus this module
serves to store the details in the database.

Login

In login module vendor and the admin will get a login session. While, registering their
details vendor will get a username and password. And the admin will login with their given
username and password.

Add product

In add product module the admin will add the details of the product, types of the product,
prize of the product and the stock details about the product. This helps the vendor to select the
product easily.
View product

View product

In view product module the vendor will view the product added by the admin. They can
also select the flavor they want to add. They will select the product they want to buy in this
module

Purchase product

If the vendor selects the product then they will add their details to buy the product. They
will select the product they want to buy. After that they will purchase it through online
5. SYSTEM TESTING

5.1 Unit Testing

The first test in the development process is the unit test. The source code is normally
divided into modules, which in turn are divided into smaller units called units. These units have
specific behavior. The test done on these units of code is called unit test. Unit test depends upon
the language on which the project is developed.

Unit tests ensure that each unique path of the project performs accurately to the
documented specifications and contains clearly defined inputs and expected results. Functional
and reliability testing in an Engineering environment. Producing tests for the behavior of
components (nodes and vertices) of a product to ensure their correct behavior prior to system
integration.

Thus the unit testing is tested with their login module whether they are logged in an
efficient manner. Such that the system is divided into each modules which are tend to be
executed.

5.2 Integration Testing

Testing is which modules are combined and tested as a group. Modules are typically code
modules, individual applications, source and destination applications on a network, etc.
Integration Testing follows unit testing and precedes system testing. Testing after the product is
code complete. Betas are often widely distributed or even distributed to the public at large in
hopes that they will buy the final product when it is release.
6. SYSTEM IMPLEMENTATION

6.1 Software Demonstration

6.1.1 Front end(JSP)

Java Server Page (JSP) is a technology for controlling the content or appearance of Web
pages through the use of servlets, small programs that are specified in the Web page and run on
the Web server to modify the Web page before it is sent to the user who requested it. Sun
Microsystems, the developer of Java, also refers to the JSP technology as the Servlet application
program interface (API). JSP is comparable to Microsoft's Active Server Page (ASP) technology.
Whereas a Java Server Page calls a Java program that is executed by the Web server, an Active
Server Page contains a script that is interpreted by a script interpreter (such as VBScript or
JScript) before the page is sent to the user. Architecturally, JSP may be viewed as a high-level
abstraction of Java servlets. JSPs are translated into servlets at runtime, therefore JSP is a
Servlets; each JSP servlet is cached and re-used until the original JSP is modified.JSP can be
used independently or as the view component of a server-side model–view–controller design,
normally with JavaBeans as the model and Java servlets (or a framework such as Apache Struts)
as the controller. This is a type of Model 2 architecture.

JSP allows Java code and certain pre-defined actions to be interleaved with static web
markup content, such as HTML, with the resulting page being compiled and executed on the
server to deliver a document. The compiled pages, as well as any dependent Java libraries,
contain Java byte code rather than machine code. Like any other Java program, they must be
executed within a Java virtual machine (JVM) that interacts with the server's host operating
system to provide an abstract, platform-neutral environment. JSPs are usually used to deliver
HTML and XML documents, but through the use of Output Stream, they can deliver other types
of data as well. The Web container creates JSP implicit objects like request, response, session,
application, config, page, pageContext, out and exception. JSP Engine creates these objects
during translation phase.
Syntax

JSP pages use several delimiters for scripting functions. The most basic is <% ... %>,
which encloses a JSP scriptlet. A scriptlet is a fragment of Java code that is run when the user
requests the page. Other common delimiters include <%= ... %> for expressions, where the
scriptlet and delimiters are replaced with the result of evaluating the expression, and directives,
denoted with <%@ ... %>.Java code is not required to be complete or self-contained within a
single scriptlet block. It can straddle markup content, provided that the page as a whole is
syntactically correct. For example, any Java if/for/while blocks opened in one scriptlet must be
correctly closed in a later scriptlet for the page to successfully compile. Content which falls
inside a split block of Java code (spanning multiple scriptlets) is subject to that code. Content
inside an if block will only appear in the output when the if condition evaluates to true. Likewise,
content inside a loop construct may appear multiple times in the output, depending upon how
many times the loop body runs.

Compiler

A Java Server Pages compiler is a program that parses JSPs, and transforms them into
executable Java Servlets. A program of this type is usually embedded into the application server
and run automatically the first time a JSP is accessed, but pages may also be precompiled for
better performance, or compiled as a part of the build process to test for errors. Some JSP
containers support configuring how often the container checks JSP files timestamps to see
whether the page has changed. Typically, this timestamp would be set to a short interval (perhaps
seconds) during software development, and a longer interval (perhaps minutes, or even never)
for a deployed Web application.

6.1.2 Back End (MySQL)

Introduction

MySQL is the world's most used open source relational database management system
(RDBMS) as of 2008 that run as a server providing multi-user access to a number of databases.
The MySQL development project has made its source code available under the terms of the
GNU General Public License, as well as under a variety of proprietary agreements. MySQL was
owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned
by Oracle Corporation.

MySQL is a popular choice of database for use in web applications, and is a central
component of the widely used LAMP open source web application software stack—LAMP is an
acronym for "Linux, Apache, MySQL, Perl/PHP/Python." Free-software-open source projects
that require a full-featured database management system often use MySQL.

For commercial use, several paid editions are available, and offer additional functionality.
Applications which use MySQL databases include: TYPO3, Joomla, Word Press, phpBB,
MyBB, Drupal and other software built on the LAMP software stack. MySQL is also used in
many high-profile, large-scale World Wide Web products, including Wikipedia, Google (though
not for searches), ImagebookTwitter, Flickr, Nokia.com, and YouTube.

Inter images

MySQL is primarily an RDBMS and ships with no GUI tools to administer MySQL
databases or manage data contained within the databases. Users may use the included command
line tools, or use MySQL "front-ends", desktop software and web applications that create and
manage MySQL databases, build database structures, back up data, inspect status, and work with
data records. The official set of MySQL front-end tools, MySQL Workbench is actively
developed by oracle, and is freely available for use.

Graphical

The official MySQL Workbench is a free integrated environment developed by MySQL


AB, which enables users to graphically administer MySQL databases and visually design
database structures. MySQL Workbench replaces the previous package of software, MySQL
GUI Tools. Similar to other third-party packages, but still considered the authoritative MySQL
frontend, MySQL Workbench lets users manage database design & modeling, SQL development
(replacing MySQL Query Browser) and Database administration (replacing MySQL
Administrator).MySQL Workbench is available in two editions, the regular free and open source
Community Edition which may be downloaded from the MySQL website, and the proprietary
Standard Edition which extends and improves the feature set of the Community Edition.

Command line

MySQL ships with some command line tools. Third-parties have also developed tools to
manage a MySQL server, some listed below. Maatkit - a cross-platform toolkit for MySQL,
PostgreSQL and Memcached, developed in Perl Maatkit can be used to prove replication is
working correctly, fix corrupted data, automate repetitive tasks, and speed up servers. Maatkit is
included with several GNU/Linux distributions such as CentOS and Debian and packages are
available for Programming. MySQL works on many different system platforms, including AIX,
BSDi, FreeBSD, HP-UX, eComStation, i5/OS, IRIX, Linux, Mac OS X, Microsoft Windows,
NetBSD, Novell NetWare, OpenBSD, OpenSolaris, OS/2 Warp, QNX, Solaris, Symbian,
SunOS, SCO Open Server, SCO UnixWare, Sanos and Tru64. A port of MySQL to OpenVMS
also exists.

MySQL is written in C and C++. Its SQL parser is written in yacc, and a home-brewed
lexical analyzer. Many programming languages with language-specific APIs include libraries for
accessing MySQL databases. These include MySQL Connector/Net for integration with
Microsoft's Visual Studio (languages such as C# and VB are most commonly used) and the
JDBC driver for Java. In addition, an ODBC interimage called MyODBC allows additional
programming languages that support the ODBC inter image to communicate with a MySQL
database, such as ASP or ColdFusion. The HTSQL - URL-based query method also ships with a
MySQL adapter, allowing direct interaction between a MySQL database and any web client via
structured URLs.

Features

As of April 2009, MySQL offered MySQL 5.1 in two different variants: the open source
MySQL Community Server and the commercial Enterprise Server. MySQL 5.5 is offered under
the same licenses. They have a common code base and include the following features:

 A broad subset of ANSI SQL 99, as well as extensions


 Cross-platform support
 Stored procedures
 Triggers
 Cursors
 Updatable Views
 Information schema
 Strict mode (ensures MySQL does not truncate or otherwise modify data to conform to an
underlying data type, when an incompatible value is inserted into that type)
 X/Open XAdistributed transaction processing (DTP) support; two phase commit as part
of this, using Oracle's InnoDB engine
 Independent storage engines (MyISAM for read speed, InnoDB for transactions and
referential integrity, MySQL Archive for storing historical data in little space)
 Transactions with the InnoDB, and Cluster storage engines
 SSL support
 Query caching
 Sub-SELECTs (i.e. nested SELECTs)
7. CONCLUSION

This Website project would allow our customers convenient and easy access to the site. It
would save time and placing orders and doing payment becomes simpler and it is very efficient.
Hence we have designed the project to provide the user with easy navigation, retrieval of data
and necessary feedback as much as possible. A good ordering cart design must be accompanied
with user-friendly ordering cart application logic. It should be convenient for the customer to
view the contents of their cart and to be able to remove or add items to their cart. The E-Ice
Cream Parlor web application described in this project provides a number of features that are
designed to make the customer more comfortable. “Online Ice-Cream Parlor” provides
knowledge about the latest technology used in developing web enabled application and client
server technology that will be great demand in future. This will provide better opportunities and
guidance in future in developing projects independently.

7.1 Future enhancement

In future enhancement the admin can add the product and maintain the stock of the added
products. If the product decreases then admin will get a notification where they can re-order the
product again.
BIBLIOGRAPHY

Book reference:

[1] Bryan basham, “Head first servlets and 2nd edition JSP”,O reilly media-2008

[2] Budi kurniawan, “ servlet and JSP and 2nd edition”Addison- Wesley longman-2003

[3] Hans Bergsten, “ java server page and 3rd edition”, O reilly associates, inc-2003

[4] Joel murach, “java servlet and JSP 2nd edition”, marach training & reference-2014

Web reference:

[1] https://en.wikipedia.org/wiki/Ice_cream

[2] https://en.wikipedia.org/wiki/List_of_ice_cream_brands
SOURCE CODE

Admin.jsp

<%--
Document : admin
Created on : Jan 10, 2018, 10:40:49 AM
Author : Java
--%>

<%@ include file="include/dbconnect.jsp" %>


<%@page import="java.util.Random"%>
<%@page import="java.sql.ResultSet"%>

<%

try
{
String a=request.getParameter("Submit");
if(a.equals("Login"))
{
String name=request.getParameter("name");
String pass=request.getParameter("pass");
out.print(name+""+pass);
if((name.equals("admin"))&&(pass.equals("admin")))
{
response.sendRedirect("admin_home.jsp");
}
else
{
%>
<script language="javascript">
alert("user name/ pass Wrong!");
window.location="admin.jsp";
</script>

<%
}
}

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

%>
<html lang="zxx">

<head>
<title>Ice Cream Hotel Category Bootstrap Responsive Web Template | Contact Us ::
W3layouts</title>
<!-- Meta tag Keywords -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
<meta name="keywords" content="Ice Cream Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template, Smartphone Compatible
web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design"
/>
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);

function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->

<!-- Custom-Files -->


<link rel="stylesheet" href="css/bootstrap.css">
<!-- Bootstrap-Core-CSS -->
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<!-- Style-CSS -->
<link rel="stylesheet" href="css/fontawesome-all.css">
<!-- Font-Awesome-Icons-CSS -->
<!-- //Custom-Files -->

<!-- Web-Fonts -->


<link href="//fonts.googleapis.com/css?family=Pacifico&amp;subset=cyrillic,latin-
ext,vietnamese" rel="stylesheet">
<link
href="//fonts.googleapis.com/css?family=Barlow+Semi+Condensed:100,100i,200,200i,300,300i,
400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&amp;subset=latin-ext"
rel="stylesheet">
<!-- //Web-Fonts -->

<style type="text/css">
<!--
.style5 {color: #1A3B5C}
-->
</style>
</head>

<body>
<!-- header -->
<div class="header">
<!-- navigation -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<h1>
<a class="navbar-brand" href="index.html">
<img src="images/logo.png" alt=" " class="img-fluid">
</a>
</h1>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

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


<ul class="navbar-nav ml-auto">
<li class="nav-item mx-lg-3">
<a class="nav-link" href="index.jsp">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="admin.jsp">Admin</a>
</li>

<li class="nav-item mx-lg-3">


<a class="nav-link" href="vendor.jsp">Vendor</a>
</li>

</ul>
</div>
</nav>
<!-- //navigation -->
</div>
<!-- //header -->
<!-- banner -->
<div class="banner-2">

</div>
<!-- //banner -->

<!-- contact -->


<div class="contact-main w3layouts-section py-5">
<div class="container py-xl-5 py-lg-3">
<div class="title-heading text-center mb-sm-5 mb-4">
<h3 class="title text-capitalize text-dark">Admin Login</h3>
<p class="title-text font-weight-light font-italic mt-2"> </p>
</div>
<div class="inner_contact">
<form name="form1" method="post" action="">
<table width="975" height="40" border="0" align="right">
<tr>
<td width="420">&nbsp;</td>
<td width="328"><table width="599" height="214" border="0" align="center">

<tr>
<td width="169" height="37"><h2 class="style5">user name </h2></td>
<td width="52">&nbsp;</td>
<td width="364"><label>
<input name="name" type="text" id="name" required="" class="txtclr" />
</label></td>
</tr>
<tr>
<td><h2 class="style5">Password</h2></td>
<td>&nbsp;</td>
<td><label>
<input name="pass" type="password" id="pass" required="" class="txtclr"
/>
</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><label>
<input type="submit" name="Submit" value="Login" class="clrbtn" />
<a href="user_reg.jsp"></a></label></td>
</tr>
</table></td>
<td width="205">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</form>
</div>
</div>
</div>

<!-- //contact -->

<!-- newsletter --><!-- //newsletter -->

<!-- footer -->


<!-- //footer -->
<!-- copyright -->

<!-- //copyright -->

<!-- Js files -->

<!-- JavaScript -->


<script src="js/jquery-2.2.3.min.js"></script>
<!-- Default-JavaScript-File -->

<!-- smooth scrolling -->


<script src="js/SmoothScroll.min.js"></script>
<!-- //smooth scrolling -->

<!-- start-smoth-scrolling -->


<script src="js/move-top.js"></script>
<script src="js/easing.js"></script>
<script>
jQuery(document).ready(function ($) {
$(".scroll").click(function (event) {
event.preventDefault();
$('html,body').animate({
scrollTop: $(this.hash).offset().top
}, 1000);
});
});
</script>
<!-- start-smoth-scrolling -->
<!-- smooth scrolling-bottom-to-top -->
<script>
$(document).ready(function () {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({
easingType: 'easeOutQuart'
});
});
</script>
<!-- //smooth scrolling-bottom-to-top -->

<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->

<!-- //Js files -->

</body>

</html>

Newproduct.jsp

<%@ include file="include/dbconnect.jsp" %>


<%@page import="java.util.Random"%>
<%@page import="java.sql.ResultSet"%>

<%
try
{
String btn = request.getParameter("Submit");
if (btn.equals("Submit"))
{
String pname = request.getParameter("pname");
String ptype = request.getParameter("ptype");
String flavour = request.getParameter("flavour");
String qty = request.getParameter("qty");
String price = request.getParameter("price");

java.util.Calendar calendar = java.util.Calendar.getInstance();


String day = String.valueOf(calendar.get(java.util.Calendar.DATE));
String month = String.valueOf(calendar.get(java.util.Calendar.MONTH) + 1);
String year = String.valueOf(calendar.get(java.util.Calendar.YEAR));

String cdate = day + "-" + month + "-" + year;


String qry = "select max(id) as maxid from product_details";
ResultSet rs = stmt1.executeQuery(qry);
int id1 = 0;
if (rs.next())
{
id1 = rs.getInt("maxid");
}
int id2 = id1 + 1;
String ins = "insert into product_details values('"+id2+"','"+pname+"','" + ptype + "','" +
flavour + "','"+qty+"','"+price+"','" + cdate + "','0','0')";
int n = stmt1.executeUpdate(ins);
if(n==1)
{
%>
<script language="javascript" >
alert("Success");
</script>

<%
}

}
}
catch (Exception e)
{
out.print(e.getMessage());
}
%>
<!DOCTYPE html>
<html lang="zxx">

<head>
<title>Ice Cream Hotel Category Bootstrap Responsive Web Template | Contact Us ::
W3layouts</title>
<!-- Meta tag Keywords -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
<meta name="keywords" content="Ice Cream Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template, Smartphone Compatible
web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design"
/>
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);

function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->

<!-- Custom-Files -->


<link rel="stylesheet" href="css/bootstrap.css">
<!-- Bootstrap-Core-CSS -->
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<!-- Style-CSS -->
<link rel="stylesheet" href="css/fontawesome-all.css">
<!-- Font-Awesome-Icons-CSS -->
<!-- //Custom-Files -->

<!-- Web-Fonts -->


<link href="//fonts.googleapis.com/css?family=Pacifico&amp;subset=cyrillic,latin-
ext,vietnamese" rel="stylesheet">
<link
href="//fonts.googleapis.com/css?family=Barlow+Semi+Condensed:100,100i,200,200i,300,300i,
400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&amp;subset=latin-ext"
rel="stylesheet">
<!-- //Web-Fonts -->

<style type="text/css">
<!--
.style5 {color: #1A3B5C}
-->
</style>
</head>

<body>
<!-- header -->
<div class="header">
<!-- navigation -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<h1>
<a class="navbar-brand" href="index.html">
<img src="images/logo.png" alt=" " class="img-fluid">
</a>
</h1>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

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


<ul class="navbar-nav ml-auto">
<li class="nav-item mx-lg-3">
<a class="nav-link" href="admin_home.jsp">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item active">
<a class="nav-link"
href="admin_new_product.jsp">New Product</a>
</li>

<li class="nav-item mx-lg-3">


<a class="nav-link"
href="admin_sales.jsp">sales</a>
</li>
<li class="nav-item mx-lg-3">
<a class="nav-link"
href="admin_stock.jsp">Stock</a>
</li>
<li class="nav-item mx-lg-3">
<a class="nav-link"
href="admin_user.jsp">User</a>
</li>
<li class="nav-item mx-lg-3">
<a class="nav-link" href="logout.jsp">Logout</a>
</li>

</ul>
</div>
</nav>
<!-- //navigation -->
</div>
<!-- //header -->
<!-- banner -->
<div class="banner-2">

</div>
<!-- //banner -->

<!-- contact -->


<div class="contact-main w3layouts-section py-5">
<div class="container py-xl-5 py-lg-3">
<div class="title-heading text-center mb-sm-5 mb-4">
<h3 class="title text-capitalize text-dark">New Product</h3>
<p class="title-text font-weight-light font-italic mt-2"> </p>
</div>
<div class="inner_contact">
<form name="form1" method="post" action="">
<table width="975" height="40" border="0" align="right">
<tr>
<td width="420">&nbsp;</td>
<td width="328">&nbsp;</td>
<td width="205">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><table width="441" height="267" border="0" align="center">
<tr>
<td><div align="left">Name </div></td>
<td><label>
<div align="left">
<input name="pname" type="text" class="txt_style" id="pname"
required="">
</div>
</label></td>
</tr>
<tr>
<td><div align="left">Type </div></td>
<td><label>
<div align="left">
<input name="ptype" type="text" class="txt_style" id="ptype" required="">
</div>
</label></td>
</tr>
<tr>
<td><div align="left">Flavor</div></td>
<td><label>
<div align="left">
<input name="flavour" type="text" class="txt_style" id="flavour"
required="">
</div>
</label></td>
</tr>
<tr>
<td><div align="left">Quantity</div></td>
<td><label>
<div align="left">
<input name="qty" type="number" class="txt_style" id="qty" required="">
</div>
</label></td>
</tr>

<tr>
<td><div align="left">Price</div></td>
<td><label>
<div align="left">
<input name="price" type="number" class="txt_style" id="price"
required="">
</div>
</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><label>
<div align="left">
<input type="submit" name="Submit" value="Submit">
</div>
</label></td>
</tr>
</table></td>
<td>&nbsp;</td>
</tr>
</table>
</form>
</div>
</div>
</div>

<!-- //contact -->

<!-- newsletter --><!-- //newsletter -->

<!-- footer -->


<!-- //footer -->
<!-- copyright -->
<!-- //copyright -->

<!-- Js files -->

<!-- JavaScript -->


<script src="js/jquery-2.2.3.min.js"></script>
<!-- Default-JavaScript-File -->

<!-- smooth scrolling -->


<script src="js/SmoothScroll.min.js"></script>
<!-- //smooth scrolling -->

<!-- start-smoth-scrolling -->


<script src="js/move-top.js"></script>
<script src="js/easing.js"></script>
<script>
jQuery(document).ready(function ($) {
$(".scroll").click(function (event) {
event.preventDefault();
$('html,body').animate({
scrollTop: $(this.hash).offset().top
}, 1000);
});
});
</script>
<!-- start-smoth-scrolling -->

<!-- smooth scrolling-bottom-to-top -->


<script>
$(document).ready(function () {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({
easingType: 'easeOutQuart'
});
});
</script>
<!-- //smooth scrolling-bottom-to-top -->
<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->

<!-- //Js files -->

</body>

</html>
Admin_user.jsp

<%@ include file="include/dbconnect.jsp" %>


<%@page import="java.util.Random"%>
<%@page import="java.sql.ResultSet"%>

<!DOCTYPE html>
<html lang="zxx">

<head>
<title>Ice Cream Hotel Category Bootstrap Responsive Web Template | Contact Us ::
W3layouts</title>
<!-- Meta tag Keywords -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
<meta name="keywords" content="Ice Cream Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template, Smartphone Compatible
web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design"
/>
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);

function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->

<!-- Custom-Files -->


<link rel="stylesheet" href="css/bootstrap.css">
<!-- Bootstrap-Core-CSS -->
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<!-- Style-CSS -->
<link rel="stylesheet" href="css/fontawesome-all.css">
<!-- Font-Awesome-Icons-CSS -->
<!-- //Custom-Files -->

<!-- Web-Fonts -->


<link href="//fonts.googleapis.com/css?family=Pacifico&amp;subset=cyrillic,latin-
ext,vietnamese" rel="stylesheet">
<link
href="//fonts.googleapis.com/css?family=Barlow+Semi+Condensed:100,100i,200,200i,300,300i,
400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&amp;subset=latin-ext"
rel="stylesheet">
<!-- //Web-Fonts -->

<style type="text/css">
<!--
.style5 {color: #1A3B5C}
.style7 {color: #D74600; }
-->
</style>
</head>

<body>
<!-- header -->
<div class="header">
<!-- navigation -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<h1>
<a class="navbar-brand" href="index.html">
<img src="images/logo.png" alt=" " class="img-fluid">
</a>
</h1>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

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


<ul class="navbar-nav ml-auto">
<li class="nav-item mx-lg-3">
<a class="nav-link" href="admin_home.jsp">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item mx-lg-3">
<a class="nav-link"
href="admin_new_product.jsp">New Product</a>
</li>
<li class="nav-item mx-lg-3">
<a class="nav-link"
href="admin_sales.jsp">sales</a>
</li>
<li class="nav-item mx-lg-3">
<a class="nav-link"
href="admin_stock.jsp">Stock</a>
</li>
<li class="nav-item active">
<a class="nav-link"
href="admin_user.jsp">User</a>
</li>
<li class="nav-item mx-lg-3">
<a class="nav-link" href="logout.jsp">Logout</a>
</li>

</ul>
</div>
</nav>
<!-- //navigation -->
</div>
<!-- //header -->
<!-- banner -->
<div class="banner-2">

</div>
<!-- //banner -->

<!-- contact -->


<div class="contact-main w3layouts-section py-5">
<div class="container py-xl-5 py-lg-3">
<div class="title-heading text-center mb-sm-5 mb-4">
<h3 class="title text-capitalize text-dark">User Details</h3>
<p class="title-text font-weight-light font-italic mt-2"> </p>
</div>
<div class="inner_contact">
<form name="form1" method="post" action="">
<table width="975" height="40" border="0" align="right">
<tr>
<td width="420">&nbsp;</td>
<td width="328">&nbsp;</td>
<td width="205">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><table width="621" height="116" border="0" align="center">
<%
ResultSet rs0=stmt3.executeQuery("select * from user_reg ");
int s=0;
while(rs0.next())
{
if(s==0)
{
%>
<tr>
<td width="32"><h4><strong><span
class="style1">Id</span></strong></h4></td>
<td width="72"><h4><strong><span
class="style1">Name</span></strong></h4></td>
<td width="96"><h4><strong><span
class="style1">Contact</span></strong></h4></td>
<td width="137"><h4><strong><span class="style1">Email-
Id</span></strong></h4></td>
<td width="85"><h4><strong><span
class="style1">Address</span></strong></h4></td>
</tr>
<%
}
s++;

%>
<tr>
<td><h4><span class="style7">
<% out.print(s);%>
</span></h4></td>
<td><h4><span class="style7">
<% out.print(rs0.getString("name"));%>
</span></h4></td>
<td><h4><span class="style7">
<% out.print(rs0.getString("contact"));%>
</span></h4></td>
<td><h4><span class="style7">
<% out.print(rs0.getString("email"));%>
</span></h4></td>
<td><h4><span class="style7">
<% out.print(rs0.getString("address"));%>
</span></h4></td>
</tr>
<%
}
%>
</table></td>
<td>&nbsp;</td>
</tr>
</table>
</form>
</div>
</div>
</div>

<!-- //contact -->

<!-- newsletter --><!-- //newsletter -->

<!-- footer -->


<!-- //footer -->
<!-- copyright -->

<!-- //copyright -->

<!-- Js files -->

<!-- JavaScript -->


<script src="js/jquery-2.2.3.min.js"></script>
<!-- Default-JavaScript-File -->

<!-- smooth scrolling -->


<script src="js/SmoothScroll.min.js"></script>
<!-- //smooth scrolling -->

<!-- start-smoth-scrolling -->


<script src="js/move-top.js"></script>
<script src="js/easing.js"></script>
<script>
jQuery(document).ready(function ($) {
$(".scroll").click(function (event) {
event.preventDefault();
$('html,body').animate({
scrollTop: $(this.hash).offset().top
}, 1000);
});
});
</script>
<!-- start-smoth-scrolling -->
<!-- smooth scrolling-bottom-to-top -->
<script>
$(document).ready(function () {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({
easingType: 'easeOutQuart'
});
});
</script>
<!-- //smooth scrolling-bottom-to-top -->

<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->

<!-- //Js files -->

</body>

</html>

Vendorproduct.jsp

<%@ include file="include/dbconnect.jsp" %>


<%@page import="java.util.Random"%>
<%@page import="java.sql.ResultSet"%>
<%
String vname=(String)session.getAttribute("vname");

%>

<!DOCTYPE html>
<html lang="zxx">

<head>
<title>Ice Cream Hotel Category Bootstrap Responsive Web Template | Contact Us ::
W3layouts</title>
<!-- Meta tag Keywords -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
<meta name="keywords" content="Ice Cream Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template, Smartphone Compatible
web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design"
/>
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);

function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->

<!-- Custom-Files -->


<link rel="stylesheet" href="css/bootstrap.css">
<!-- Bootstrap-Core-CSS -->
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<!-- Style-CSS -->
<link rel="stylesheet" href="css/fontawesome-all.css">
<!-- Font-Awesome-Icons-CSS -->
<!-- //Custom-Files -->

<!-- Web-Fonts -->


<link href="//fonts.googleapis.com/css?family=Pacifico&amp;subset=cyrillic,latin-
ext,vietnamese" rel="stylesheet">
<link
href="//fonts.googleapis.com/css?family=Barlow+Semi+Condensed:100,100i,200,200i,300,300i,
400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&amp;subset=latin-ext"
rel="stylesheet">
<!-- //Web-Fonts -->

<style type="text/css">
<!--
.style5 {color: #1A3B5C}
.style7 {color: #D74600; }
-->
</style>
</head>
<body>
<!-- header -->
<div class="header">
<!-- navigation -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<h1>
<a class="navbar-brand" href="index.html">
<img src="images/logo.png" alt=" " class="img-fluid">
</a>
</h1>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

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


<ul class="navbar-nav ml-auto">
<li class="nav-item mx-lg-3">
<a class="nav-link"
href="vendor_home.jsp">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item mx-lg-3">
<a class="nav-link"
href="vendor_purchase.jsp">Purchase</a>
</li>

<li class="nav-item active">


<a class="nav-link"
href="vendor_product.jsp">Product</a>
</li>
<li class="nav-item mx-lg-3">
<a class="nav-link" href="logout.jsp">Logout</a>
</li>

</ul>
</div>
</nav>
<!-- //navigation -->
</div>
<!-- //header -->
<!-- banner -->
<div class="banner-2">
</div>
<!-- //banner -->

<!-- contact -->


<div class="contact-main w3layouts-section py-5">
<div class="container py-xl-5 py-lg-3">
<div class="title-heading text-center mb-sm-5 mb-4">
<h3 class="title text-capitalize text-dark">Purchase Details Home
</h3>
</div>
<div class="inner_contact">
<form name="form1" method="post" action="">
<table width="975" height="40" border="0" align="right">
<tr>
<td width="420">&nbsp;</td>
<td width="328"><table width="864" height="173" border="0" align="center">
<%
ResultSet rs0=stmt3.executeQuery("select * from purchase_details where
vname='"+vname+"'");
int s=0;
while(rs0.next())
{
if(s==0)
{
%>
<tr>
<td width="54"><h3><strong><span
class="style1">Id</span></strong></h3></td>
<td width="187"><h3><strong><span class="style1">Product
Name</span></strong></h3></td>
<td width="174"><h3><strong><span
class="style1">Flavor</span></strong></h3></td>
<td width="141"><h3><strong><span
class="style1">Count</span></strong></h3></td>
<td width="140"><h3><strong><span
class="style1">Date</span></strong></h3></td>
<td width="142"><h3><strong><span
class="style1">Price</span></strong></h3></td>
</tr>
<%
}
s++;

%>
<tr>
<td><h3><span class="style7">
<% out.print(s);%>
</span></h3></td>
<td><h3><span class="style7">
<% out.print(rs0.getString("pname"));%>
</span></h3></td>
<td><h3><span class="style7">
<% out.print(rs0.getString("flavor"));%>
</span></h3></td>
<td><h3><span class="style7">
<% out.print(rs0.getString("count"));%>
</span></h3></td>
<td><h3><span class="style7">
<% out.print(rs0.getString("cdate"));%>
</span></h3></td>
<td><h3><span class="style7">
<% out.print(rs0.getString("amount"));%>
</span></h3></td>
</tr>
<%

}
%>
</table></td>
<td width="205">&nbsp;</td>
</tr>
</table>
</form>
</div>
</div>
</div>

<!-- //contact -->

<!-- newsletter --><!-- //newsletter -->

<!-- footer -->


<!-- //footer -->
<!-- copyright -->

<!-- //copyright -->

<!-- Js files -->

<!-- JavaScript -->


<script src="js/jquery-2.2.3.min.js"></script>
<!-- Default-JavaScript-File -->

<!-- smooth scrolling -->


<script src="js/SmoothScroll.min.js"></script>
<!-- //smooth scrolling -->

<!-- start-smoth-scrolling -->


<script src="js/move-top.js"></script>
<script src="js/easing.js"></script>
<script>
jQuery(document).ready(function ($) {
$(".scroll").click(function (event) {
event.preventDefault();
$('html,body').animate({
scrollTop: $(this.hash).offset().top
}, 1000);
});
});
</script>
<!-- start-smoth-scrolling -->

<!-- smooth scrolling-bottom-to-top -->


<script>
$(document).ready(function () {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({
easingType: 'easeOutQuart'
});
});
</script>
<!-- //smooth scrolling-bottom-to-top -->

<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->

<!-- //Js files -->


</body>
</html>

SCREEN SHOT

Das könnte Ihnen auch gefallen