You are on page 1of 152

MCSP-060

by
Manohar Kumar
ENRL No: 071178842
Under u!dan"e
o#
Mr$ San%o&h 'ha
Submitted to the School of Computer and Information Science,
IGNOU in partial fulfillment of the requirements for the award of
the degree
Master of Computer Applications MCA!
"##$
Indira Gandhi National Open Uni%ersit&
Maidan Garhi
New 'elhi())##*+
Table of Content
), (n%rodu"%!on
),), Pro)e"% *e&"r!+%!on:$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 1
),", ,e"hno-o.y U&ed$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 2
),",), '2EE 1$4$1$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 2
),",", '*/C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4
),",-, 0y+er ,e1% Mar2u+ Lan.ua.e $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8
),",., 'a3a S"r!+% $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4
),",/, 5R6CLE $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10
", Pro)e"% -!#e "y"-e
",), So#%7are *e3e-o+men% -!#e "y"-e $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17
-, Re8u!remen% 6na-y&!&
-,), 53er3!e7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 21
-,", 5b)e"%!3e o# re8u!remen% ana-y&!& $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22
-,-, So#%7are re8u!remen% &+e"!#!"a%!on $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29
-,-,), (n%rodu"%!on $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29
-,-,", Produ"% de&"r!+%!on$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24
-,-,-, U&a.e &"enar!o $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 2:
-,-,., *a%a ob)e"%& and de&"r!+%!on $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 26
-,-,/, *e&!.n "on&%ra!n%& $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27
., Sy&%em *e&!.n!n.
.,), 53er3!e7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28
.,),), *a%aba&e *e&!.n $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28
.,),", 0uman ; Ma"h!ne (n%er#a"e *e&!.n $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28
.,", So#%7are *e&!.n &+e"!#!"a%!on $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 90
.,",), *a%aba&e *e&!.n $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 90
.,-, Pro"e&& Mode-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 98
.,-,), <un"%!ona- *e"om+o&!%!on *!a.ram$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 98
.,-,", *a%a <-o7 *!a.ram$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94
/, Cod!n. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 46
*, Sna+&ho%&
*,), =!&!%or !n%er#a"e& $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 110
*,", 6dm!n!&%ra%or !n%er#a"e& $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 122
0, ,e&%!n. and !m+-emen%a%!on
0,), ,e&%!n. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190
0,),), ,e&%!n. 5b)e"%!3e& $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190
0,),", ,e&%!n. Pr!n"!+-e& $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190
0,),-, Un!% ,e&%!n. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191
0,),., (n%e.ra%!on ,e&%!n. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194
0,),/, Sy&%em ,e&%!n. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 196
0,),*, 5+%!m!>a%!on Po!n%& $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 198
+, L!m!%a%!on& and <u%ure *e3e-o+men%& $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194
+,), Con"-u&!on $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194
$, /!b-!o.ra+hy
$,), /oo2& ? 6u%hor& $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 142
$,", Con&u-%ed @eb&!%e $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 142
a.
1
Introduction

1.1. Project Description
1(commerce is fast gaining ground as an accepted and used business paradigm, More and more business
houses are implementing web sites pro%iding functionalit& for performing commercial transactions o%er the
web, It is reasonable to sa& that the process of shopping on the web is becoming commonplace,
2he ob3ecti%e of this pro3ect is to de%elop a general purpose e(commerce store where an& product such as
boo4s, C's, computers, mobile phones, electronic items, and home appliances! can be bought from the
comfort of home through the Internet,
5owe%er, for implementation purposes, this paper will deal with an online boo4 store,
An online store is a %irtual store on the Internet where customers can browse the catalog and select
products of interest, 2he selected items ma& be collected in a shopping cart, At chec4out time, the items in
the shopping cart will be presented as an order, At that time, more information will be needed to complete
the transaction, Usuall&, the customer will be as4ed to fill or select a billing address, a shipping address, a
shipping option, and pa&ment information such as credit card number, An e( mail notification is sent to the
customer as soon as the order is placed,
1.2. Technologies Used
1.2.1. Java Server Pages (JSP)
6ith the ad%ent of Internet, the monolithic application architecture changed to the multi(tiered client7ser%er
architecture, 2he need for ser%er(side scripting graduall& began to dominate aspects of 6eb 8rogramming,
Microsoft introduced Acti%e Ser%er 8ages AS8! to capture the mar4et demand for ser%er(side scripting,
6or4ing on similar lines, Sun Micros&stems released 9a%a Ser%er 8ages 9S8! to add ser%er side
programming functionalities to 9a%a,
A t&pical web application consists of the presentation logic representing the static content used to design
the structure of a web page in terms of the page la&out, color, and te:t, 2he business logic or the d&namic
content in%ol%es application of business intelligence and diagnostics in terms of financial and business
calculations, 6hen de%eloping web applications, time is often lost in situations where the de%eloper is
required to code for the static content,
9S8 2echnolog& has facilitated the segregation of wor4 profiles of a web designer and a web de%eloper, A
6eb 'esigner can design and formulate the la&out for the web page b& using 52M;, On the other hand, a
6eb 'e%eloper wor4ing independentl& can use 9a%a code and other 9S8 specific tags to code for the
business logic, 2he simultaneous construction of static and d&namic content facilitates de%elopment of
qualit& applications with increased producti%it&,
The JSP Reuest!Response "#cle$
9S8 files are stored on the web ser%er with an e:tension of ,3sp, 6hen the client7browser requests for a
particular 9S8 page, the ser%er in turn sends a request to the 9S8 1ngine,
2he following figure represents the process of the flow of e%ents that occur after a client requests for a 9S8
page,
The Reuest!Response "#cle %or a JSP Page
2he request(response c&cle essentiall& comprises of two phases, namel& the translation phase and request(
processing phase, 2he translation phase is implemented b& the 9S8 engine and in%ol%es generation of a
ser%let, Internall&, these results in the creation of a class file for the 9S8 page that implements the ser%let
interface, 'uring the request(processing phase, the response is generated according to the request
specification, 2he ser%let then sends bac4 a response corresponding to the request recei%ed, After the
ser%let is loaded for the first time, it remains acti%e and possesses all the subsequent requests with
responses, sa%ing time that would otherwise be lost in reloading a ser%let at each request,
6eb
Ser%er
9S8
1ngine!
<rowser
=equest
=esponse
Ser%let =eloaded
Chec4 to ensure
if the call to 9S8
is first of its 4ind
Ser%let
Generation and
recompilation
=esponse
N
O
>
e
s
=esponse
),","
JD&"
9'<C 9a%a 'atabase Connecti%it&! is an application program interface A8I! specification for connecting
programs written in 9a%a to the data in popular database, It is pro%ided b& Sun Micros&stems, the
application program interface lets &ou encode access request statements in structured quer& language S?;!
that are then passed to the program that manages the database, It returns the results through a similar
interface,
@rom the userAs point of %iew, 9a%a application loo4s something li4e thisB
'eatures o% JD&" (PI$
Java Database Connectivity 9'<C! pro%ides a database programming A8I for 9a%a programs, Some of the
features of 9'<C A8I are as followsB
9a%a Application
Oracle
9'<C
MS S?; M& S?; S&base
Contains a set of classes and interfaces that are used to connect to a database built using an&
'<MS7='<MS, submit S?; queries to a database, and retrie%e and process the results of S?;
queries,
Is a low(le%el interface in which S?; select and update statements are called directl& from within
9a%a programs,
Can be used with both two(tier and three(tier database architectures, In two(tier architecture, a
9a%a program in%o4es the methods of 9'<C A8I, which in turn communicates with the database
ser%er, In three(tier architecture, a 9a%a applet or an 52M; form submits S?; queries to a
middle(tier ser%er, Middle(tier ser%er in turn uses 9'<C A8I to communicate with the database
ser%er,

JD&" (rchitecture$
2he 9'<C architecture is based on a collection of 9a%a interfaces and classes that
together enables &ou to connect to data sourced, to create and e:ecute S?;
statements, and to retrie%e and modif& sata in a database, 2hese operations are
illustrated in the figure belowB
1ach of the bo:es in the illustration represents a 9'<C class or interface that has
fundamental role in accessing a relational database,
'ri%erManager Connection Statement
Creates Creates
=esultSet
Creates
'ri%er
'atabase
Established link to DB
JD&" Drivers$
9'<C A8I ta4es care of con%erting 9a%a commands to generic S?; statements, 5owe%er, to address
specific database issues, each database %endor pro%ides a dri%er along with the database, 9a%a Applications
in%o4e the methods 9'<C A8I, 9'<C A8I in turn uses a dri%er to communicate with a specific database,
9'<C A8I submits queries to the 9'<C dri%er, 2he 9'<C dri%er con%erts queries to a form that a
particular '<MS7='<MS can understand, 2he 9'<C dri%er also retrie%es the results of S?; queries,
con%erts it into equi%alent 9'<C A8I classes and ob3ects that can be used b& the application, Since the
9'<C 'ri%er onl& ta4es care of the interactions with database, an& change made to the database does not
affect the application,
JD&" (rchitecture
2here are se%eral categories of 9'<C 'ri%ers pro%ided b& different database %endors, 2he& areB
'*/C-5*/C /r!d.e *r!3er: 2he first categor& of 9'<C dri%ers pro%ides a bridge between the
9'<C A8I and the O'<C A8I, 2here are se%eral '<MS7='<MS, such as MS Access and
S?; Ser%er that contain the O'<C 'ri%er embedded into them, Since the O'<C A8I is
written in the C language and ma4es use of pointers and other constructs that 9a%a does not
support, a 9a%a program cannot directl& communicate with an O'<C 'ri%er, 2he bridge
translates the standard 9'<C calls to corresponding O'<C calls, and sends them to O'<C
data source %ia O'<C libraries,
Na%!3e 6P( Par%-y 'a3a *r!3er: 2hese dri%ers use a mi:ture of 9a%a implementation and %endor
specific nati%e A8Is to pro%ide data access, 9'<C database calls are translated into %endor
specific A8I calls, 2he database will process the request and sends the result bac4 through the
'a3a 6++-!"a%!on '*/C
6P(
'*/C */MSAR*/MS
*r!3er
A8I, which will in turn forward them bac4 to the 9'<C dri%er, 2he 9'<C dri%er will translate
the result to the 9'<C standard and return them to the 9a%a application, 2here is one la&er
fewer to go through than for a t&pe ) dri%er and so in general a t&pe " dri%er will be faster than
a t&pe ) dri%er,
Some '<MS7='<MS such as '<" and Informi: contain a 9'<C dri%er supplied b& the
database %endor,
(n%ermed!a%e *a%aba&e 6""e&& Ser3er: 2&pe - dri%ers use an intermediate database ser%er that
has the abilit& to connect multiple 9a%a clients to multiple database ser%ers, Clients connect to
database ser%er %ia an intermediate ser%er component that acts as a gatewa& for multiple
database ser%ers, 2he 3a%a client application sends a 9'<C call through a 9'<C dri%er to the
intermediate data access ser%er, which completes the request to the data sourcing using another
dri%er for e:ample, a t&pe " dri%er!,
<1A 6eb;ogic includes a t&pe - dri%er, One of the benefit of using a t&pe - dri%er is that it
allows fle:ibilit& on the architecture of the application, as the intermediate ser%er can can
abstract details of connection to database ser%ers,
Na%!3e Pro%o"o- Pure 'a3a *r!3erA'*/C-Ne% Pure 'a3a *r!3er: 2hese dri%ers con%ert the
9'<C A8I calls to direct networ4 calls using %endor specific networ4ing protocol, 2he& do this
b& ma4ing direct soc4et connections with the database, 2&pe . dri%ers offer better performance
than others,
1.2.). *#per Te+t ,ar-up .anguage (*T,.)
5&perte:t Mar4up ;anguage 52M;! is a language for describing how pages of
te:t, graphics, and other Information are organiCed, formatted, and lin4ed together,
It is not reall& a programming language in the sense of CO<O; or Disual <asic, but
it does pro%ide powerful capabilities for te:t formatting and output displa&, 2he
original purpose of 52M; was primaril& as a tool for ma4ing te:t documents
readil& a%ailable on the Internet, <asic graphic support was added, and the things
started to ta4e off, Now we ha%e sound, li%e %ideo, retail catalogs, and much, much
more a%ailable to us,
52M; pages are the standard interface to the Internet, 2his basic language pro%ides the necessar& nuts and
bolts for building 6eb pages,
52M; stands for 5&per 2e:t Mar4up ;anguage and was de%eloped specificall& for use on the s&stem of
lin4s, which can be non sequential in order, 52M; is not a programming language, It is a mar4ing up
language used for lin4ing one piece of information to another,
Using a mar4up language means that tags can be added to the words in the document and web enable them,
A tag is a set of descripti%e formatting codes used in 52M; document that instructs a web browser how to
displa& te:t and graphics on a web page,
52M; ",# is the first standard of 52M; specification, released in )$$*, 52M; -,* was the ne:t
specification to be de%eloped, It was a 3oint effort of man& software companies li4e Microsoft, I<M, Sun
Micros&stems, No%ell and others,
52M; .,# is the latest %ersion of 52M;, which includes CSS and d&namic 52M;
features,
1.2./. JavaScript
2he pro3ect uses 9a%aScript as the client side scripting language for 9S8752M; pages in the pro3ect,
9a%aScript is an eas& to use ob3ect(scripting language designed for creating li%e online applications that lin4
together resources on both clients and ser%ers, 9a%aScript is designed for use b& 52M; page authors and
enterprise application de%elopers to d&namicall& script the beha%ior of ob3ects running on either the client
or the ser%ers, 9a%aScript Es design and concept represent the ne:t generation of software for the Internet
and isB
'esigned for creating networ4 centric applications
Complementar& to and integrated with 9a%a
Complementar& to and integrated with 52M;
Open and cross platform
9a%aScript is a platform(independent, e%ent dri%en, interpreted programming language de%eloped b&
Netscape Communications Corp, and Sun Micros&stems, Originall& called ;i%escript, 9a%aScript is a
programming language that can be included on web pages to ma4e them more interacti%e,
9a%aScript is easier to understand, less comple: %ersion of its distant cousin, 9a%a, It is a te:t(based
language that must be placed within 52M; that must be placed within, 52M;, to be read b& the browser
and interpreted so the instructions can be performed,
9a%aScript is a preferred language for client side scripting, 2his is mainl& because when client side scripting
is done browser compatibilit& is an issue of concern and both ma3or browsers support 9a%aScript,

1.2.0 1racle $
Oracle ta4es business where it needs to beB meeting and e:ceeding stringent demands for high(qualit&
ser%ice in a ser%ice(dri%en mar4etplace, Oracle is designed to optimiCe traditional, internet and intranet
applications, and to stimulate the emerging hosted application mar4et on the internet,
Oracle builds on historic strengths to offer the first complete and simple software infrastructure for the
internetAs ne:t generation of intelligent, collaborati%e applications, 2he Oracle new features e:pedite
deli%er& of critical performance, scalabilit&, and a%ailabilit& essential to pro%iding hosted ser%ice software
for an&one, an&where, an&time, Oracle architecture is shown in figureB
Oracle components include the followingB
Oracle 'atabase
Oracle Application Ser%er
Oracle 'e%eloper Suite
1racle Data2ase$
2he Oracle 'atabase introduces the following ad%anced and automated design features that refine Oracle
Application Ser%er and Oracle 'e%eloper Suite to optimiCe performance for traditional applications and the
emerging hosted application mar4et,
5ra"-e Rea- 6++-!"a%!on C-u&%er&:
2he ne:t e%olutionar& step after Oracle 8arallel Ser%er, Oracle =eal Application Clusters pro%ides out(of(
the(bo:, linear scaling transparenc&, compatibilit& with all applications without redesign, and the abilit& to
rapidl& add nodes and dis4s,
Sy&%em& Mana.emen%
Integrated s&stem management products create a complete %iew of all critical components that dri%e e(
business processes, @rom the client and application ser%er to the database and host, Oracle quic4l& and
completel& assesses the o%erall health of an e(business infrastructure,
0!.h 63a!-ab!-!%y
Setting a new standard for high a%ailabilit&, Oracle introduces powerful new functionalit& in areas of
disaster reco%er&, s&stem fault reco%er&, and planned downtime,
0!.h Se"ur!%y
Oracle offers the most secure internet platform for protecting compan& information through multiple la&ers
of securit& for data, users, and companies, Included are features for building internet(scale applications, for
pro%iding securit& for users, and for 4eeping data from different hosted user communities separate,
1racle (pplication Server$
=ecogniCed as the leading application ser%er for database(dri%en 6eb sites, Oracle Application Ser%er
offers the industr&As most inno%ati%e and comprehensi%e set of middle(tier ser%ices,
Com+rehen&!3e M!dd-e-%!er Ser3!"e&
Continued inno%ation within comprehensi%e middle(tier ser%ices, ranging from self ser%ice enterprise
portals, to e(stores and supplier e:change, sustains the Oracle Application Ser%er as the industr&As preferred
application ser%er for database(dri%en 6eb sites,
Ne7 Ca"h!n. ,e"hno-o.y
2he new caching technolog& in Oracle can dramaticall& increase 6eb site performance, scalabilit&, and
a%ailabilit&, Greater numbers of users can be pro%ided with more personaliCed, d&namic 6eb content
without adding more application or database ser%ers,
S"a-ab!-!%y and Per#orman"e
Superb scalabilit& and performance now is made a%ailable for all 6eb applications, Oracle 8ortal ser%ices
ma4e it eas& for 6eb site de%elopers to deplo& enterprise portals with centraliCed management and unified
securit&, Standard 9a%a, with rich FM; and content management support, as well as bac4(office
transactional applications built using Oracle @orms 'e%eloper, can easil& be deplo&ed,
@!re-e&& *e3!"e 6""e&&
Information in an& database or internet application is easil& a%ailable through Oracle, Support for each
wireless de%iceAs specific mar4up language is no longer necessar&,
/u&!ne&& (n%e--!.en"e
Oracle Application Ser%er has built(in reporting and ad hoc quer& functionalit& to deri%e business
intelligence after 6eb site deplo&ment,
1racle Developer Suite$
Oracle Internet 'e%eloper Suite combines leading Oracle applications de%elopment tools, business
intelligence tools, and enterprise portal building tools in a single, integrated product, <uilt on internet
standards such as 9a%a, FM;, CO=<A, and 52M;, the Oracle Internet 'e%eloper Suite pro%ides a high(
performance de%elopment en%ironment with tools needed to respond to rapidl& changing mar4ets and user
demands,
E1%en&!3e *e3e-o+men% 6-%erna%!3e&
Oracle Internet 'e%eloper Suite tools are suitable for an& 4ind of de%elopment approach, including
component(based de%elopment, 9a%a coding, and %isual modeling, and offer rapid application de%elopment
based on .G;, Applications can be de%eloped for all clients, including 5igh 8roducti%e 9a%a Client,
Uni%ersal 52M; Client, and An&where Mobile Client,
,oo-&
Oracle Internet 'e%eloper Suite tools includeB Oracle @orms 'e%eloperG Oracle 'esignerG Oracle
9'e%eloper and <usiness Components for 9a%aG Oracle =eports 'e%eloperG and Oracle 'isco%erer,
5%her <ea%ure&
All applications are single, middle(tier deplo&able with an Oracle Application Ser%er, Oracle 8ortal is
a%ailable for an integrated, personaliCed portal %iew with all applications, Integrated business intelligence
for enterprise reporting and ad(hoc quer& is a%ailable,
1racle Data2ase 3e4 'eatures$
Important new features are introduced with the release of the Oracle 'atabase, including ad%ancements in
=eal Application Clusters, s&stems management, a%ailabilit&, scalabilit&, and securit&,
1$ 63a!-ab!-!%y:
Oracle dramaticall& e:tends OracleAs leadership in Internet database a%ailabilit&, which is critical for an& e(
business application, He& areas in Oracle includeB
1nhanced 'isaster =eco%er& 1n%ironment
Online 'ata 1%olution
8recision 'atabase =epair
2$ S"a-ab!-!%y:
Oracle allows e(business to scale the most demanding e(business applications with intensi%e transactions
loads, He& areas includeB
Increased 2ransaction 2hroughput on Oracle =eal Application ClustersB
Scalable Session State ManagementB
@ine(Grained, Automatic =esource ManagementB
9$ Per#orman"e:
Oracle is the continued performance leader in all rele%ant areas, Measurement and tuning pro3ects continue
to impro%e Oracle runtime performance, Ma3or focus performance impro%ements in Oracle are in areas
critical for e(business,
Nati%e Compilation and Impro%ed 8;7S?; OptimiCationB
;atch Contention Impro%ementsB
1nhanced 9a%a 8erformanceB
Networ4 and 'istributed 'atabase 8erformanceB
4$ Se"ur!%y:
Oracle continues to pro%ide the most secure application de%elopment and deplo&ment platform in the
industr&, He& areas includeB
Strong 2hree(2ier Securit&B
Securit& for 5osting 1n%ironmentsB
Standards(<ased 8ublic He& Infrastructure 8HI!B
Impro%ed User and Securit& 8olic& ManagementB
'ata 1ncr&ption and ;abel Securit&
S5. P.US$
S?;8;US is usuall& thought of as a 4ind of interacti%e report writer, It uses S?; to get information from the
Oracle database, and lets &ou create reports b& gi%ing &ou eas& control o%er titles, column headings, subtotals
and totals, reformatting of numbers and te:t, and much more, It also can be used to change the database b&
using insert, update, and delete commands in S?;, S?;8;US can e%en be used as a code generator, where a
series of commands in S?;8;US can d&namicall& build a program and then e:ecute it,
In most production applications, more ad%anced report writers are usedIsuch as 6eb(based parameter(dri%en
reports, S?;8;US is most commonl& used for simple queries and printed reports, Getting S?;8;US to format
information in reports according to &our taste and needs requires onl& a handful of commands, or 4e&words that
instruct S?;8;US how to beha%e,
>ou can write S?;8;US reports while wor4ing interacti%el& with S?;8;USIthat is, &ou can t&pe commands
about page headings, column titles, formatting, brea4s, totals, and so on, and then e:ecute a S?; quer&, and
S?;8;US will immediatel& produce the report formatted to &our specifications, @or quic4 answers to simple
questions that arenAt li4el& to recur, this is a fine approach, More common, howe%er, are comple: reports that
need to be produced periodicall&, and that &ouAll want to print rather than 3ust %iew on the screen,
Unfortunatel&, when &ou quit S?;8;US, it promptl& forgets e%er& instruction &ouA%e gi%en it, If &ou were
restricted to using
S?;8;US onl& in this interacti%e wa&, then running the same report at a later time would require t&ping
e%er&thing all o%er again,
2he alternati%e is %er& straightforward, >ou simpl& t&pe the commands, line b& line, into a file, S?;8;US can
then read this file as if it were a script, and e:ecute &our commands 3ust as if &ou were t&ping them, In effect,
&ou create a report program, but &ou do it without a programmer or a compiler, >ou create this file using an& of
the popular editor programs a%ailable or e%en gi%en certain restrictions! a word processor,
2he editor is not a part of Oracle, 1ditors come in hundreds of %arieties, and e%er& compan& or person seems to
ha%e a fa%orite, Oracle realiCed this, and decided to let &ou choose which editor program to use, rather than
pac4aging a program with Oracle and forcing &ou to use it, 6hen &ouAre read& to use &our editor program, &ou
suspend S?;8;US, 3ump o%er to the editor program, create or change &our S?;8;US report program also
called a start file!, and then 3ump bac4 to S?;8;US right at the spot &ou left and run that report see @igure *(
)!,
S?;8;US also has a built(in editor of its own, sometimes called the command line editor, which allows &ou to
quic4l& modif& a S?; quer& without lea%ing S?;8;US,
*!##eren"e be%7een SBL and SBL P-u&:
S5. S5. P.US
S?; is a language for communicating with the oracle
ser%er to access data,
S?; J8;US recogniCes S?; statements and sends
them to the ser%er,
S?; is based on American National Standards
Institute ANSI! standard S?;,
S?; J8;US is the Oracle proprietr& interface for
e:ecuting S?l statements,
S?; manipulates data and table definitions in the
database,
S?; J8;US does not allow manipulation of
%alues in the database,
S?; does not ha%e a continuation character, S?; J8;US uses a dash(! as a continuation
character if the command is longer than one line,
It can not be abbre%iated, It can be abbre%iated,
S?; uses a termination character to e:ecute
commands immediatel&,
S?; J8;US does not require termination
characterG e:ecutes commands immediatel&,
S?; uses functions to perform some formatting, S?; J8;US uses commands to format data,

2
Project .i%e "#cle

2.1 So%t4are Develop6ent .i%e "#cle$
Software de%elopment organiCation follows some process when de%eloping a software
product, A 4e& component of an& software de%elopment process is the life c&cle model
on which the process is based, 2he particular life c&cle model can significantl& affect
o%erall life c&cle costs associated with a software product, ;ife c&cle of the software
starts from concept e:ploration and at the retirement of the software,
<ea&!b!-!%y S%udy
Re 8 u ! r e me n %
6 n a - y & ! &
Sy&%em ,e&%! n.
* e & ! . n ! n .
C o d ! n .
(m+-emen%a%!on
and Ma!n%enan"e
So#%7are *e3e-o+men% L!#e Cy"-e
P*(S7S 1' S8ST7, D797.1P,73T .I'7 "8".7$
2he s&stem de%elopment life c&cle is classicall& thought of as the set of acti%ities
that anal&sts, designers and users carr& out to de%elop and implement an information
s&stem, 2he s&stem de%elopment life c&cle consists of the following acti%itiesB
8reliminar& in%estigation,
=equirement Anal&sis,
S&stem 'esigning,
Coding,
S&stem 2esting,
Implementation and Maintenance,

Pre-!m!nary (n3e&%!.a%!on : -
An important outcome of the preliminar& in%estigation is the determination that
s&stem is feasible or not, In the conduct of feasibilit& stud&, there are three ma3or
distinct and interrelated areas were ta4en into consideration, 2he& are as followsB
), 2echnical @easibilit& B
2he S&stem of operation which was functioning earlier was totall& manual, with no
4ind of automation or computeriCation, All the departments were maintaining
separate registers for 4eeping %arious records, 'ue to e:pansion of schools more
wor4space and it appears a tedious tas4 to maintain with specif&ing equipment and
software that will successfull& support the tas4s required, As a result the
computeriCed s&stem is technicall& feasible as it is efficient, less time consuming,
can produce outputs faster, can input large amount of data in limited time scale and
easier to use in operation
", Operational @easibilit& B (
2he ultimate users i,e, the people who are supposed to use the s&stem are trained for
a period of one month so as to get familiar with the new s&stem and its operation,
2he& are taught about the new s4ills and the new technolog& and how the
technolog& will be useful to them in their functioning, Operational feasibilit& is
concerned with human, organiCational and political aspects, General impression of
these factors is gained from the corporate appraisal,
-, 1conomical @easibilit& B
2he computeriCed s&stem is economicall& feasible in the sense the cost of the
hardware and software and the cost to training of personnel of the compan& to
operate the s&stem and the installation cost is less than the cost of maintaining the
registers, 2his ma& not be a big sum in the long run of the school business, Also the
time ta4en for the entire process of formulation, chec4ing, stud&ing and installation
of the pro3ect has been equal to one wor4ing month of the school, As a result, there
has been no hesitation on pert of the management in adopting the new s&stem,

Re8u!remen%& ana-y&!& :-
Anal&sis of requirements includes stud&ing the e:isting s&stem and collecting data,
'uring anal&sis, data are collected on the a%ailable files, decision points and
transaction handled b& the present s&stem, Once the structured anal&sis is
completed, the anal&st has affirmed understanding of what is to be done,

Sy&%em *e&!.n!n.:
2he design of an information s&stem produces the details that clearl& describe how a
s&stem will meet the requirements identified during s&stem anal&sis, S&stem
anal&sts begin the design process b& identif&ing reports and other outputs s&stem
will produce, 2he s&stem design also describes the data to be input, calculated or
stored,

Cod!n. : -
2his is the phase in which computer based s&stem is constructed from the
specifications prepared in the design phase, 1quipment is acquired and installed
during the de%elopment phase, All necessar& procedure, manuals software
specifications, and other documentation are completed, 2he staff is trained,

Sy&%em ,e&%!n.:-
'uring s&stem testing, the s&stem is used e:perimentall& to ensure that the software
does not fail, In other words we can sa& that it will run according to its
specifications and in the wa& users e:pect, Special test data are input for processing,
and the result e:amined,
(m+-emen%a%!onC E3a-ua%!on and Ma!n%enan"e:-
Implementation is the process of ha%ing s&stems personnel chec4 out and put new
equipments into use, train users, install the new application and construct an& files
of data needed to use it,
1%aluation of the s&stem is performed to identif& its strength and
wea4nesses, Maintenance is necessar& to eliminate errors in the wor4ing s&stem
during its wor4ing life and to tune the s&stem to an& %ariations in its wor4ing
en%ironment, 2he importance of maintenance is to continue to bring the new s&stem
to standards,
9
Reuire6ent (nal#sis

).1 1vervie4$
Anal&sis is a @act @inding 2echnique where studies li4e UserAs need, S&stem
=equirement Specifications, @easibilit& Anal&sis and Cost(<enefit Anal&sis are carried
out,
2his is the most important step in a software pro3ect where we get a general idea about
the needs of the customers or end users b& ha%ing man to man con%ersation with them
and about the %arious conditions and restrictions that ha%e to be ta4en care of while
de%eloping the software application,
2he purpose of this phase is to identif&, anal&Ce and document the e:act requirements for
the s&stem, 2he de%eloper, customer, a mar4eting organiCation, or an& combination of the
three ma& perform such stud&, It is e:tremel& important that the de%elopers of the s&stem
stud& the e:isting s&stem thoroughl& otherwise it is impossible to satisf& the needs of the
user, 2he requirements at this stage are in end(user terms,
'uring the =equirement Anal&sis 8hase, the de%elopment team anal&Ces the
requirements to be fulfilled b& the Online Shoping Cart website and identifies the
probable approach for meeting these requirements, 2o identif& the requirements needed
b& the website, we decided to stud& the e:isting Shopping Cart process li4e Searching
<oo4, Adding to Cart, mone& transfer, In this phase we ha%e also collect necessar&
information regarding the details to be stored =egistered customer,
Client 7 User Needs
8roblem Anal&sis
=equirement Anal&sis
Dalidation
Dalidated
S=S
).2 12jective o% Reuire6ent (nal#sis$
=equirement anal&sis was conducted with the following ob3ecti%es in mindB
Identification of need
Information Gathering
1%aluate the s&stem concept of feasibilit&
1. (den%!#!"a%!on o# Need:
2he success of the s&stem depends largel& on how accuratel& a problem is defined,
thoroughl& in%estigated, and properl& carried out through the choice of solution, Users
need identification and anal&sis is concerned with what the user needs rather then what
he7she wants, Until the problem has been identified, defined, and e%aluated the anal&st
shouldnKt thin4 about solutions and whether the problem is worth sol%ing or not,
2$ (n#orma%!on a%her!n.:
A 4e& part of s&stem de%elopment is gathering information, 2he anal&st must 4now what
information to get, where to find it, how to collect it, and how to ma4e use of it, 2he
proper use of tools for gathering information is the 4e& to successful anal&sis,
9$ <ea&!b!-!%y S%udy:
@easibilit& stud& is carried out to test if the proposed s&stem is feasible in terms of
econom&, technolog&, resource a%ailabilit& etc, As such, gi%en unlimited resources and
infinite time, all pro3ects are feasible, Unfortunatel&, such results and time are not
possible in real life situations, 5ence it is both necessar& and prudent to e%aluate the
feasibilit& of the pro3ect at the earliest possible time in order to a%oid unnecessar&
wastage of time, effort and professional embarrassment o%er an ill concei%ed s&stem,
).) So%t4are Reuire6ents Speci%ication (SRS)$
).).1 Introduction$
A, Purpose$
2his document completel& describes what the LShopping CartM should do without
describing how the software will do it, 2he basic goal of the requirement phase is to
produce the S=S, which describing the complete e:ternal beha%ior of the purposed
software,
&.
Scope$
2his document is the onl& one that describes the requirements of the s&stem, It is meant
for use b& the de%eloper and will be the basis for %alidating the final deli%ered s&stem,
An& changes made to the requirements in the future will ha%e to go through a formal
changes appro%al process, 2he de%eloper is responsible for as4ing for clarifications,
where necessar&, and will not ma4e an& alteration without the permission of the client,
".
Developer:s responsi2ilit#$
2he de%eloper is responsible forB
a! 'e%eloping the s&stem,
b! Installing the software on the clientAs hardware,
c! Conducting an& user training that might be needed for using the s&stem,
d! Maintaining the s&stem for a period of one &ear after installation,
).).2 Product description$
2his section pro%ides an o%er%iew of the software, 2his section describes the goal and
ob3ecti%e of the software, 2his section also briefl& describes the general requirements of
the software, 2his section is %er& important for the %erification of the software after the
completion whether the ob3ecti%e and requirements of the software will met or not,
A. ;oals and o2jective$
2he main purpose of LOnline shopping CartM is to pro%ide the Shopping related ser%ices
on the Internet, 2his software also helps to automate the process of ordering the boo4s in
home using internet , 2he goals of L Online Shopping CartM areB
2o automate the time consuming process to go to boo4 store and purchases
boo4s ,
2o ad%ertise the new boo4s a%ailable in Internet,
2o manage the records of customers, <oo4s 'etails, Stoc4 'etails,
2o pro%ide a searchable database of all customers and accounts,
2o minimiCe the amount of paper wor4 required in the dail& ser%ices,
2o pro%ide a secure interface for the ban4ing transactions,
2o pro%ide an interface so that user can ta4e ad%antage of an&time, an&where
Shopping,
&.
;eneral reuire6ents$
'uring the =equirement Anal&sis 8hase, the de%elopment team anal&Ces the
requirements to be fulfilled b& the Online Shopping website and identifies the probable
approach for meeting these requirements, 2o identif& the requirements needed b& the
website, we decided to stud& the e:isting Shoping process li4e Searching <oo4s , mone&
transfer, In this phase we ha%e also collect necessar& information regarding the details to
be stored b& the database for opening an account,
@inall&, it was identified that the Shopping 6ebsite shouldB
1nable the %isitors to fill =egistration form,
8ro%ide details of the %arious <oo4s a%ailable in Stores,
8ro%ide the information about the rate of the a%ailable boo4s,
<e secure enough against the malicious securit& attac4, identit& %erification of
the registered user and authoriCation,
<e able to handle %arious run time e:ceptions and errors,
It should pro%ide proper interfaces to manage and %iew details,
2he web pages should be user friendl& and well design to attract %isitors,
).).) Usage Scenario$
2his section pro%ides a usage scenario for the software, It organiCed information
collected during requirements elicitation into use(cases,
A.
User Pro%iles$
2here will be three le%els of usersB
Administrator le%el 1mplo&ee!
User le%el Account 5older!
B.
Use!cases$
6dm!n!&%ra%or -e3e-:
2his le%el of users will be able to insert new <oo4s, new Categor& and 8rice
information,, 2he& will also be able to generate
U&er Le3e-:
2his le%el of users will be able to Search the boo4s, Order the boo4s etc, 2he& can %iew
their records,
).)./ Data 12jects and description$
'uring the requirement anal&sis phase, the de%elopment team e:amines e:isting
Shopping Cart , After e:amining all process and feasibilit& we decided to consider
following points while designing databaseB
It should store information of the =egistered user details,
It should store information of the <oo4s details,
It should store information of the %arious accounts,
It should store information of the %arious categor& of the boo4s,
Design constraints$
(. *ard4are Reuire6ent$
I. Server (<indo4s 2=== Server (3T))
Microsoft "### Ser%er is based on N2 2echnolog& biased to run ser%er side
scripts in AS8 technolog&,
'is4 Space - G<,
6eb Ser%er Microsoft IIS *,#!
II. "lient
'is4 Space )G<,
8rocessor 8entium III
8rocessor Speed ),)-GhC
Memor& "/* M<
&. So%t4are Reuire6ent$
5+era%!n. Sy&%em B 6indows "### 7 N2 7 F8
,e"hno-o.!e& : 9'<C, 9a%a <eans
C-!en% S!de S"r!+%!n. Lan.ua.e B 52M; and 9S8 and 9a%a,
Ser3er S!de S"r!+%!n. Lan.ua.e : 9S8
Mar2u+ Lan.ua.e : 52M;
*a%aba&e Ser3er B O=AC;1
@eb Ser3er B 2omcat .,#
4
S#ste6 Designing

/.1 197R9I7<$
S&stem design is a solution, a L5O6 2O A88=OAC5M to the creation of a new s&stem,
2his important phase is composed of se%eral steps, It pro%ides the understanding and
procedural details to implement the s&stem, 'esign goes through a logical and ph&sical
stage of the progress, ;ogical design re%iews the present ph&sical s&stem, prepares
input7output specifications, ma4es audit securit& and control specifications, detailed
implementation plans, and prepares the logical design wal4through, 2he ph&sical design
ma4es out the details of the ph&sical s&stem, plans the s&stem implementation and
specifies an& new hardware and software products,
/.1.1 D(T(&(S7 D7SI;3$
2he collection of data is usuall& referred to as the database, 2he database contains the
information about one particular enterprise, 'atabase s&stem of data in%ol%es both the
definitions of structures for the storage of information, processing and mechanism for the
manipulation of information, In addition, the database s&stem pro%ides for the safet& of
information stored in the database despite s&stem crashes or attempts of unauthoriCed
access,
1.1.2 *U,(3!,("*I37 I3T7R'("7 D7SI;3$
2he design of the human machine interface in one of the most important aspects of
s&stem design, A good interface design should ta4e into account the following factorsB (
U&er "hara"%er!&%!"&:
It includes consideration of the 4inds of the users who will use the equipment, their
di%erse bac4grounds and s4ills, the user e:pectations as well as their ph&sical
characteristics, 2he users who posses high degree of s4ill often prefer more powerful
functions which usuall& means greater comple:it&, uns4illed operations, on the other
hand, would simple functions which are easier to learn and use,
,a&2 Chara"%er!&%!"&:
2he nature of the users tas4s differ and therefore the needs for specific(4inds of ser%ice
from the s&stem, @or e:ample unstructured tas4s usuall& requires a more fle:ible mode of
interaction to meet the %ar&ing needs of users as opposed to structured tas4s, which are
more predictable and repetiti%e, 2he sequence and frequenc& with which certain tas4s are
performed will also affect the optimal design of the user interface,
<un"%!ona- Chara"%er!&%!"&:
It refers to the %arious functions required to perform the tas4s and the ease with which
these functions can be learnt made use of b& the users while ascertaining the functional
characteristics, the support facilities required to perform the functions, also need to be
ta4en into account, 2hese include facilities li4e training, on line help, documentation,
e:pert s&stem etc, the other aspect of functional characteristics of a s&stem its
performance criteria li4e response time, fault tolerance etc,

(NPU, *ES(N:
2he most common cause of errors in data processing is inaccurate input data, 1rrors
entered b& data entr& operators can be controlled b& the input design, Input design is the
process of con%erting user(oriented inputs to computer based formats, 2he goal of input
design to ma4e data entr& eas& logical and free from errors,

5U,PU, *ES(N:
Computers are the most important source of information to the user, Inputs are fed into
computers to acquire the required outputs, 2he computers can pro%ide %aluable
informationAs in the form of well(documented outputs for %arious %alues, 2he ma3or form
of output is a hardcop& reports! from the printer, =eports are around the output
requirements of the user,
4.2
So%t4are Design Speci%ication$
2his section pro%ides an o%er%iew of the entire design document, 2his document
describes all data, architectural, interface and component(le%el design for the software,
/.2.1 Data2ase Design$
(. Ta2les description$
Ta2le 1$
Ta2le De%inition$
,ab-e Name $ Ca%e.oryD*e%a!-&:
Purpose : Store information about book category.
Pr!mary Key : Categor&I'
<ore!.n Key :
"olu6ns De%inition$
S$ N5$ N6ME *6,6 ,EPE S(FE NULLSG *E<6UL, =6LUE
) Ca%e.ory(d Number / No
" Ca%e.oryName DA=C5A=" "/ No
Ta2le Description$
S$ N5$ N6ME *ESCR(P,(5N
) /R6NC0DN5 A s&stem generated number auto posted to this table column,
" N6ME Name of the Categor&,
Ta2le 2$
Ta2le De%inition$
,ab-e Name : /oo2D*e%a!-&
Pur+o&e : Stores details about boo4s such as boo4 title, author etc,
Pr!mary Key : <oo4I'
<ore!.n Key :
CA21GO=>N'12AI;S,CA21GO=>I'O<OOHN'12AI;S,CA21GO=>
"olu6ns De%inition$
S$N5$ N6ME *6,6 ,EPE S(FE NULLSG *E<6UL, =6LUE
) /oo2(d Number / No
" Ca%e.ory(d Number / No
- ,!%-e DA=C5A=" /# No
. 6u%hor DA=C5A=" -# No
/ Pub-!&her DA=C5A=" -# No
* Ed!%!on DA=C5A=" / No
0 Pr!"e Number 0," No
+ Buan%!%y Number - No
$ *e&"r!+%!on Darchar" )## >es
Ta2le description$
S$N5$ N6ME *ESCR(P,(5N
) /oo2(d A s&stem generated number auto posted to this table column,
" Ca%e.ory(* =eference to Categor&N'etails
- ,!%-e 2itle of the <oo4,
. 6u%hor Author Name of the boo4,
/ Pub-!&her Store the <oo4 8ublisher,
* Ed!%!on Store the edition of the <oo4,
0 Pr!"e Contain the 8rice Information,
+ Buan%!%y Contain the quantit& a%ailable in store,
$ *e&"r!+%!on 'etails of the boo4 information
Ta2le )$
Ta2le De%inition$
,ab-e Name : 5*ERD*E,6(LS
Pur+o&e : Stores information about the order placed b& the end user,
Pr!mary Key :
<ore!.n Key : O='1=N'12AI;S,O='1=I'
O='1=N'12AI;S,O='1=I'
"olu6ns De%inition$
S$N5$ N6ME *6,6,EPE S(FE NULLSG *E<6UL, =6LUE
) 5R*ER(* NUM<1= / No
" /55K(* NUM<1= / No
- BU6N,(,E NUM<1= - No
Ta2le Description$
S$N5$ N6ME *ESCR(P,(5N
) 5R*ER(* A s&stem generated number auto posted to this table column,
" /55K(* =eference to <oo4N'etails table,
- BU6N,(,E Store the order quantit&,
Ta2le /$
Ta2le De%inition$
,ab-e Name : ,EMPD*E,6(LS
Pur+o&e :2his table will holds the details about the boo4 that ha%e been searched
b& the end user,
Pr!mary Key :
<ore!.n Key :
Columns Definitions:
S$N5$ N6ME *6,6 ,EPE S(FE NULLSG *E<6UL, =6LUE
) /oo2(d Number / No
" Ca%e.ory(d Number / No
- ,!%-e DA=C5A=" /# No
. 6u%hor DA=C5A=" -# No
/ Pub-!&her DA=C5A=" -# No
* Ed!%!on DA=C5A=" / No
0 Pr!"e Number 0," No
+ Buan%!%y Number - No
$ *e&"r!+%!on Darchar" )## >es
Ta2le description$
S$N5$ N6ME *ESCR(P,(5N
) /oo2(d Store the boo4 id of boo4 details table,
" Ca%e.ory(* Store the categor& id of boo4 details table,
- ,!%-e 2itle of the <oo4,
. 6u%hor Author Name of the boo4,
/ Pub-!&her Store the <oo4 8ublisher,
* Ed!%!on Store the edition of the <oo4,
0 Pr!"e Contain the 8rice Information,
+ Buan%!%y Contain the quantit& a%ailable in store,
$ *e&"r!+%!on 'etails of the boo4 information
Ta2le >$
Ta2le De%inition$
,ab-e Name : USERDPro#!-e
Pur+o&e : Store the information about all the registered user,
Pr!mary Key : UserName
<ore!.n Key :
"olu6ns De%inition$
S$ N5$ N6ME *6,6,EPE S(FE NULLSG *E<6UL, =6LUE
) USERN6ME DA=C5A=" -# No
" P6SS@5R* DA=C5A=" )/ No
- <(RS,N6ME DA=C5A=" )# No
. M(**LEN6ME DA=C5A=" )# >es
/ L6S,N6ME DA=C5A=" )# No
* 6**RESS1 DA=C5A=" .# No
0 6**RESS2 DA=C5A=" .# >es
+ C(,E DA=C5A=" .# No
$ S,6,E DA=C5A=" "# No
)# P(NC5*E DA=C5A=" )# No
)) EM6(L DA=C5A=" "/ No
)" P05NE DA=C5A=" )" No
Ta2le Description$
S$ N5$ N6ME *ESCR(P,(5N
) USERN6ME Store the user name
" P6SS@5R* Store information of user password
- <(RS,N6ME Store the first name of the user
. M(**LEN6ME Store the middle name of the user,
/ L6S,N6ME Store the information of the user last name,
* 6**RESS1 Store the information of the user address,
0 6**RESS2 Optional
+ C(,E User cit&
$ S,6,E User state
)# P(NC5*E State pin code
)) EM6(L User email address
)" P05NE User phone number
2able *B
Ta2le De%inition$
,ab-e Name : USERD6U,0
Pur+o&e : Stores the username and password of %arious end users,
Pr!mary Key :
<ore!.n Key : US1=N8=O@I;1,US1=NAM1OUS1=NAU25,US1=NAM1
"olu6ns de%inition$
S$ N5$ N6ME *6,6,EPE S(FE NULLSG *E<6UL, =6LUE
) USERN6ME DA=C5A=" -# No
" P6SS@5R* DA=C5A=" )/ No
Ta2le description$
S$ N5$ N6ME *ESCR(P,(5N
) USERN6ME Store the user name of the end users,
" P6SS@5R* Stores the password of the user,
/.2. Process ,odel
A 8rocess Model tells us about how the data is processed and how the data flows
from one table to another to gather the required information, 2his model consists of the
@unctional 'ecomposition 'iagram and 'ata @low 'iagram,
/.2.1. 'unctional Deco6position Diagra6
A decomposition diagram shows a top(down functional decomposition of a
s&stem and e:poses the s&stemKs structure, 2he ob3ecti%e of the @unctional
'ecomposition is to brea4 down a s&stem step b& step, beginning with the main function
of a s&stem and continuing with the interim le%els down to the le%el of elementar&
functions, 2he diagram is the starting point for more detailed process diagrams, such as
data flow diagrams '@'!, @igure " shows the @unctional 'ecomposition 'iagram for
this pro3ect,
<un"%!ona- *e"om+o&!%!on *!a.ram
/.2.2 Data 'lo4 Diagra6 (D'D)
'ata @low 'iagrams show the flow of data from e:ternal entities into the s&stem,
and from one process to another within the s&stem, 2here are four s&mbols for drawing a
'@'B
), =ectangles representing external entities, which are sources or destinations of
data,
", 1llipses representing processes, which ta4e data as input, %alidate and process it
and output it,
-, , Arrows representing the data flows, which can either, be electronic data or
ph&sical items,
., Open(ended rectangles or a 'is4 s&mbol representing data stores, including
electronic stores such as databases or FM; files and ph&sical stores such as filing
cabinets or stac4s of paper,
'ata @low 'iagrams for the current s&stem, 1ach process within the s&stem is first
shown as a Conte:t ;e%el '@' and later as a 'etailed '@', 2he Conte:t ;e%el '@'
pro%ides a conceptual %iew of the process and its surrounding input,output and data
stores, 2he 'etailed '@' pro%ides a more detailed and comprehensi%e %iew of the
interaction among the sub(processes within the s&stem,
Cu&%omer-/ro7&e Con%e1% *<*
Cu&%omer - Sho++!n.Car% Con%e1% *<*
Cu&%omer - Sho++!n. Car% *e%a!-ed *<*
Cu&%omer-6u%hen%!"a%!on Con%e1% *<*
Cu&%omer-6u%hen%!"a%!on-Pur"ha&e0!&%ory *<*
Cu&%omer-6u%hen%!"a%!on-U&erPro#!-e *<*

6u%hen%!"a%ed U&er-Pur"ha&e Con%e1% *<*

6u%hen%!"a%ed U&er-Pur"ha&e *<*
:
"oding

Login.html
PhtmlQ
PheadQ
PtitleQ;oginP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
P7C1N21=Q
PSC=I82 languageRS9a%aScriptSQ
function %alidate!
U
ifdocument,frm,UserName,%alueRRSSVV
document,frm,8assword,%alueRRSS!
U
alertSUserName or 8assword cannot be blan4WWS!G
returnG
X
document,frm,actionRSDalidate,3spSG
document,frm,submit!G
X
P7SC=I82Q
Pform name R frm methodRS8OS2SQ
Pp alignRScenterSQPfont siCeRS/SQPbQ;ogin @ormP7bQP7fontQP7pQ
P2A<;1 A;IGNRScenterS heightRS/0SQ
P2=Q
P2' Q
PbQUserNameBP7bQ
P72'Q
P2' Q
Pinput t&peRSte:tS nameRSUserNameS siCeRS"#S tabinde:RS)SQ
P72'Q
P72=Q
P2=Q
P2' Q
PbQ8asswordBP7bQ
P72'Q
P2' Q
Pinput t&peRSpasswordS nameRS8asswordS siCeRS"#S tabinde:RS"SQ
P72'Q
P2= alignRScenterSQ
P2' colspanR"Q
Pinput t&peRSbuttonS %alueRS ;ogin S nameRS<)S onclic4RS%alidate!GS
tabinde:RS-SQ
P72'Q
P72=Q
P2= Q
P2' QPfont siCeRS.SQNew UserYP7fontQP72'Q
P2'QPa hrefRSNewUser,htmSQPfont iCeRS.SQ=egisterP7fontQP7aQP72'Q
P72=Q
P72A<;1Q
P7formQ
P7bod&Q
P752M;Q
NewUser.html
PhtmlQ
PheadQ
PtitleQNew User =egistrationP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
P7C1N21=Q
Pform nameRSform)S methodRS8OS2S Q
PSC=I82 languageRS9a%aScriptSQ
function %alidate!
U
if document,form),UserName,%alueRRSS!
U
alertSUserName cannot be blan4S!G
returnG
X
if document,form),8assword,%alueRRSS!
U
alertS8assword cannot be blan4S!G
returnG
X
if document,form),8assword,%alueWR document,form),8assword",%alue!
U
alertS2he two passwords do not matchS!G
returnG
X
if document,form),@irstName,%alueRRSS!
U
alertS@irst Name cannot be blan4S!G
returnG
X
ifdocument,form),;astName,%alueRRSS!
U
alertS;ast Name cannot be blan4S!G
returnG
X
if document,form),Address),%alueRRSS!
U
alertSAddress cannot be blan4S!G
returnG
X

if document,form),Cit&,%alueRRSS!
U
alertSCit& cannot be blan4S!G
returnG
X
if document,form),State,%alueRRSSelect StateS!
U
alertS>ou must select a stateS!G
returnG
X
if document,form),8inCode,%alueRRSS!
U
alertS8inCode cannot be blan4S!G
returnG
X
if document,form),1mail,%alueRRSS!
U
alertS1mail I' cannot be blan4S!G
returnG
X
if document,form),8hone,%alueRRSS!
U
alertS8hone Number cannot be blan4S!G
returnG
X
document,formsZ#[,actionRSSign,3spSG
document,formsZ#[,submit!G

X
P7SC=I82Q

Pp alignRScenterSQ
PbQPfont siCeRS/SQ New User =egistrationP7fontQP7bQ\nbspG
\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG
P7pQ
Pp alignRSleftSQ
\nbspGPbQPfont colorRST@@####SQ @ield mar4ed J are
necessar&!P7fontQ\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbs
pG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbsp
G\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG\nbspG
\nbspG\nbspG\nbspG\nbspGP7bQ
P7pQ
Pdi% alignRSleftSQ
Ptable borderRS#S widthRS)##]SQ
PtrQ
Ptd widthRS"-]SQPbQUser JBP7bQP7tdQ
Ptd widthRS00]SQ
PbQ
Pinput t&peRSte:tS nameRSUserNameS siCeRS"#S tabinde:RS)SQ
P7bQ
P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]SQ
PbQ
8asswordJBP7bQP7tdQ
Ptd widthRS00]SQPbQPinput t&peRSpasswordS nameRS8asswordS siCeRS"#S
tabinde:RS"SQ
P7bQ
P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]SQ
PbQ
Confirm 8asswordJBP7bQ
P7tdQ
Ptd widthRS00]SQPbQPinput t&peRSpasswordS nameRS8assword"S siCeRS"#S
tabinde:RS-SQ
P7bQ
P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]SQ
PbQ
@irst NameJBP7bQP7tdQ
Ptd widthRS00]SQ
PbQPinput t&peRSte:tS nameRS@irstNameS siCeRS"#S tabinde:RS.SQ
P7bQ
P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]SQ
PbQ
Middle NameBP7bQP7tdQ
Ptd widthRS00]SQ
PbQ
Pinput t&peRSte:tS nameRSMiddleNameS siCeRS"#S tabinde:RS/SQ
P7bQ
P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]SQ
PbQ
;ast NameJBP7bQP7tdQ
Ptd widthRS00]SQ
PbQPinput t&peRSte:tS nameRS;astNameS siCeRS"#S tabinde:RS*SQ
P7bQ
P7tdQ
P7trQ
P7tableQ
P7di%Q
Pdi% alignRScenterSQ
PcenterQ
Ptable borderRS#S widthRS)##]S heightRS"#)SQ
PtrQ
Ptd widthRS"-]S heightRS"/SQPbQAddress)JB\nbspG\nbspGP7bQP7tdQ
Ptd widthRS00]S heightRS"/SQPbQPinput t&peRSte:tS nameRSAddress)S siCeRS.-S
tabinde:RS0SQ P7bQ P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]S heightRS"/SQPbQAddress"B\nbspGP7bQP7tdQ
Ptd widthRS00]S heightRS"/SQPbQPinput t&peRSte:tS nameRSAddress"S siCeRS.-S
tabinde:RS+SQ P7bQ P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]S heightRS"/SQPbQCit&JB\nbspGP7bQP7tdQ
Ptd widthRS00]S heightRS"/SQPbQPinput t&peRSte:tS nameRSCit&S siCeRS"#S
tabinde:RS$SQ P7bQ P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]S heightRS"/SQPbQStateJBP7bQP7tdQ
Ptd widthRS00]S heightRS"/SQPbQPselect siCeRS)S nameRSStateS tabinde:RS)#SQ
Poption selected %alueRSSelect StateSQSelect StateP7optionQ
PoptionQAssamP7optionQ
PoptionQArunachal 8radeshP7optionQ
PoptionQ5ar&anaP7optionQ
PoptionQMaharashtraP7optionQ
PoptionQ=a3asthanP7optionQ
PoptionQUttar pradeshP7optionQ
P7selectQ P7bQ P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]S heightRS"/SQPbQ8in CodeJB\nbspGP7bQP7tdQ
Ptd widthRS00]S heightRS"/SQPbQPinput t&peRSte:tS nameRS8inCodeS siCeRS"#S
tabinde:RS))SQ P7bQ P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]S heightRS"/SQPbQ1mail I'JBP7bQP7tdQ
Ptd widthRS00]S heightRS"/SQPbQPinput t&peRSte:tS nameRS1mailS siCeRS"#S
tabinde:RS)"SQ P7bQ P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]S heightRS"/SQPbQ8hone NumberJBP7bQP7tdQ
Ptd widthRS00]S heightRS"/SQPbQPinput t&peRSte:tS nameRS8honeS siCeRS"#S
tabinde:RS)-SQ P7bQ P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]S heightRS)SQP7tdQ
Ptd widthRS00]S heightRS)SQ P7tdQ
P7trQ
PtrQ
Ptd widthRS"-]S heightRS")SQP7tdQ
Ptd widthRS00]S heightRS")SQ
PbQ
Pinput t&peRSsubmitS %alueRSSubmitS nameRS<)S onclic4RS%alidate!GS
tabinde:RS)-SQ
P7bQ
P7tdQ
P7trQ
P7tableQ
P7centerQ
P7di%Q

P7formQ
P7bod&Q
P752M;Q
Sign.jsp
PhtmlQ
Pbod& bgcolorRSTCC@@@@SQ
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS importRS3a%a,sql,JS ]Q
P]
Connection connG
connRnullG
=esultSet rsG
rsRnullG
String UserNameRrequest,get8arameterSUserNameS!G
String 8asswordRrequest,get8arameterS8asswordS!G
String 8assword"Rrequest,get8arameterS8assword"S!G
String @irstNameRrequest,get8arameterS@irstNameS!G
String MiddleNameRrequest,get8arameterSMiddleNameS!G
String ;astNameRrequest,get8arameterS;astNameS!G
String Address)Rrequest,get8arameterSAddress)S!G
String Address"Rrequest,get8arameterSAddress"S!G
String Cit&Rrequest,get8arameterSCit&S!G
String StateRrequest,get8arameterSStateS!G
String 8inCodeRrequest,get8arameterS8inCodeS!G
String 1mailRrequest,get8arameterS1mailS!G
String 8honeRrequest,get8arameterS8honeS!G
int flagR#G
tr&
U
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
conn R'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
8reparedStatement statR conn,prepareStatementSS1;1C2 J @=OM
userNprofile where usernameRYS !G
stat,setString),UserName!G
rs R stat,e:ecute?uer&!G
out,printlnSquer& e:ecutedS!G
ifrs,ne:t!!
U
flagR)G
]Q
PSC=I82 languageRS9a%aScriptSQ
alertSUser name alread& e:istsS!G
location,hrefRSNewUser,htmSG
P7SC=I82Q
P]
X
else
U
flagR#G 77 conn,close!G
X
X
catch1:ception 1!
U
out,printlnS1rror S_1!G
X
ifflag RR #!
U
tr&
U
8reparedStatement stat)Rconn,prepareStatementSINS1=2 IN2O
userNauth %aluesY,Y!S!G
stat),setString),UserName!G
stat),setString",8assword!G
8reparedStatement statRconn,prepareStatementSINS1=2 IN2O
userNprofile %aluesY,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y!S!G
stat,setString),UserName!G
stat,setString",8assword!G
stat,setString-,@irstName!G
stat,setString.,MiddleName!G
stat,setString/,;astName!G
stat,setString*,Address)!G
stat,setString0,Address"!G
stat,setString+,Cit&!G
stat,setString$,State!G
stat,setString)#,8inCode!G
stat,setString)),1mail!G
stat,setString)",8hone!G
stat,e:ecuteUpdate!G
stat),e:ecuteUpdate!G
flagR#G
response,send=edirectS;ogin,htmS!G
X
catch1:ception 1!
U
out,printlnS1rror inserting %alueS_1!G
X
finall&
U
rs,close!G
conn,close!G
X
X
]Q
P7bod&Q
P7htmlQ
Validate.jsp
PhtmlQ
Pbod&Q
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS importRS3a%a,sql,JS ]Q
P]
Connection connG
connRnullG
=esultSet rsG
rsRnullG
tr&
U
String strNameRrequest,get8arameterSUserNameS!G
String str8assRrequest,get8arameterS8asswordS!G
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
conn R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
8reparedStatement statR conn,prepareStatementSS1;1C2 J @=OM
userNauth where usernameRY and password RYS!G
stat,setString),strName!G
stat,setString",str8ass!G
rs R stat,e:ecute?uer&!G
ifrs,ne:t!!
U
String str),str"G
str)Rrs,getString)!G
str"Rrs,getString"!G
out,printlnstr)_str"!G
session,putDalueSuserS,strName!G
ifstr),equalsSAdministratorS!!
U
response,send=edirectSAdmin,htmS!G
X
else
U
out,printlnS;ogged INS!G
response,send=edirectSSearchCriteria,3spS!G
X
X
else
U
response,send=edirectSIn%alidUser,htmS!G
X
X
catch1:ception 1!
U
out,printlnS1rror S_1!G
X
finall&
U
rs,close!G
conn,close!G
X
]Q
P7bod&Q
P7htmlQ
SearchCriteria,3sp
PhtmlQ
PheadQ
PtitleQSearch ItemsP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
P7C1N21=Q
PSC=I82 languageRS9a%aScriptSQ
function startSearch!
U
ifdocument,frm,=)Z)[,chec4ed!
U
ifdocument,frm,<oo42itle,%alueRRSS!
U
alertS>ou must enter a boo4 titleS!G
returnG
X
X

ifdocument,frm,=)Z"[,chec4ed!
U
ifdocument,frm,<oo4Author,%alueRRSS!
U
alertS>ou must enter an author nameS!G
returnG
X
X

ifdocument,frm,=)Z-[,chec4ed!
U
ifdocument,frm,<oo48ublisher,%alueRRSS!
U
alertS>ou must enter a publisher nameS!G
returnG
X
X

document,frm,actionRSsearch,3spSG
document,frm,submit!G
X
P7SC=I82Q

P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
8reparedStatement stat R nullG
=esultSet rs R nullG
int ctrR#, flagR#G
tr&
U
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
stat R con,prepareStatementSselect J from categor&NdetailsS!G
rsRstat,e:ecute?uer&!G
]Q
Pform name RSfrmS methodRS8OS2SQ
PcenterQPfont siCeRS/SQSearch <oo4sP7fontQP7pQP7centerQ
P<=QP<=Q

Ptable borderRS#S widthRS)##]S heightRS)$*SQ
PtrQ
Ptd widthRS)0]S alignRSrightS heightRS"/SQPinput t&peRSradioS
%alueRSCategor&S chec4ed nameRS=)SQP7tdQ
Ptd widthRS-"]S heightRS"/SQSearch b& Categor&P7tdQ
Ptd widthRS/)]S heightRS"/SQ
Pselect siCeRS)S nameRS<oo4Categor&SQ
Poption selected %alueRSSelectSQSelect Categor&P7optionQ
P]
whilers,ne:t!!
U
String categor&Rrs,getString"!G]Q
Poption %alueRSP]Rcategor&]QSQP]Rcategor&
]QP7optionQ
P]X]Q
P7selectQ
P7tdQ
P7trQ
PtrQ
Ptd widthRS)0]S alignRSrightS heightRS"/SQPinput t&peRSradioS
nameRS=)S %alueRS2itleSQP7tdQ
Ptd widthRS-"]S heightRS"/SQSearch b& <oo4 2itleP7tdQ
Ptd widthRS/)]S heightRS"/SQPinput t&peRSte:tS nameRS<oo42itleS
siCeRS"/SQP7tdQ
P7trQ
PtrQ
Ptd widthRS)0]S alignRSrightS heightRS"/SQPinput t&peRSradioS
nameRS=)S %alueRSAuthorSQP7tdQ
Ptd widthRS-"]S heightRS"/SQSearch b& <oo4 AuthorP7tdQ
Ptd widthRS/)]S heightRS"/SQPinput t&peRSte:tS nameRS<oo4AuthorS
siCeRS"/SQP7tdQ
P7trQ
PtrQ
Ptd widthRS)0]S alignRSrightS heightRS"/SQPinput t&peRSradioS
nameRS=)S %alueRS8ublisherSQP7tdQ
Ptd widthRS-"]S heightRS"/SQSearch b& <oo4 8ublisherP7tdQ
Ptd widthRS/)]S heightRS"/SQPinput t&peRSte:tS nameRS<oo48ublisherS
siCeRS"/SQP7tdQ
P7trQ
PtrQ
P7trQ
PtrQ
Ptd widthRS)0]S alignRSrightS heightRS")SQP7tdQ
Ptd widthRS-"]S heightRS")SQ\nbspG\nbspG
\nbspG\nbspG\nbspG\nbspGPinput t&peRSbuttonS %alueRS Search S nameRSSearchS
onClic4RSstartSearch!GSQP7tdQ
Ptd widthRS/)]S heightRS")SQPa hrefRS;ogout,3spSQClic4 here to
logoutP7aQP7tdQ
P7trQ
P7tableQ

P7formQ
P]
X
catch1:ception e!
U
out,printS1rror R S _ e _ SP5=QS!G
X
finall&
U
rs,close!G
con,close!G
X
]Q
P7bod&Q
P7htmlQ
Search,3sp
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS importRS3a%a,sql,JS ]Q
PhtmlQ
PheadQ
PtitleQSearch =esultsP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
Pfont siCeRS/S QSearch =esultsP7fontQ
P7C1N21=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P]
String strNsearch%arRnullG
int ch4NctrR#G
String strNcol%arRnullG
String tabN%arRSSG
String userNsrcRString!session,getDalueSuserS!G
S&stem,out,printlnS#S!G
if userNsrcWRnull!
U
String quer&RnullG
Connection connG
connRnullG
=esultSet rsG
rsRnullG
ifrequest,get8arameterS=)S!,equalsS2itleS!!
U
strNsearch%arRrequest,get8arameterS<oo42itleS!G
strNcol%arRS2I2;1SG
X
ifrequest,get8arameterS=)S!,equalsSCategor&S!!
U
ch4NctrR)G
strNsearch%arRrequest,get8arameterS<oo4Categor&S!G
strNcol%arRSCategor&nameSG
X
ifrequest,get8arameterS=)S!,equalsS8ublisherS!!
U
strNsearch%arRrequest,get8arameterS<oo48ublisherS!G
strNcol%arRS8ublisherSG
X
ifrequest,get8arameterS=)S!,equalsSAuthorS!!
U
strNsearch%arRrequest,get8arameterS<oo4AuthorS!G
strNcol%arRSAuthorSG
X
if request,get8arameterS="S!RRnull!
U
tabN%arRS<OOHN'12AI;SSG
X
else
U
77 to get the name of the table in which the search to be done(((((((
if request,get8arameterS="S!,equalsSAS!!
U
tabN%arRS21M8N'12AI;SG
X
else
U
tabN%arRS<OOHN'12AI;SSG
X
X
S&stem,out,printlnstrNsearch%ar!G
quer& R Sselect a,J from S_tabN%ar_S a, categor&Ndetails b where a,S_strNcol%ar_S
R Y and a,CA21GO=>I' R b,CA21GO=>I'SG
S&stem,out,printlnS)S!G
tr&
U
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
conn R'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
int ctrR#G
S&stem,out,printlnS"S!G
8reparedStatement stm R conn,prepareStatementquer&!G
stm,setString),strNsearch%ar!G
rs R stm,e:ecute?uer&!G
]Q
Pform nameRScartS actionRSInterNCart,3spS methodRS8OS2SQ
Ptable borderR)Q
PtrQ
PtdQS,NoP7tdQ
PtdQSelectP7tdQ
PtdQ<oo4 NameP7tdQ
PtdQAuthor NameP7tdQ
PtdQ8ublisherP7tdQ
PtdQ1ditionP7tdQ
PtdQ8rice in =s,!P7tdQ
PtdQ?uantit& A%ailableNos,!P7tdQ
PtdQ'escriptionP7tdQ
P7trQ
P]
whilers,ne:t!!
U
S&stem,out,printlnSinside whileS!G
ctrRctr_)G
out,printlnSPtrQPtdQS_ctr_SP7tdQS!G
int intN<OOHI'R#G
intN<OOHI'Rrs,getInt)!G
S&stem,out,printlnintN<OOHI'!G
out,printlnSPtdQPinput t&peRchec4bo: nameRch4S_ctr_S
%alueRS_intN<OOHI'_SQS!G
int intNCA21GO=>I'Rrs,getInt"!G
String strN2I2;1Rrs,getString-!G
out,printlnSPtdQS!G
out,printlnstrN2I2;1!G
out,printlnSP7tdQS!G
String strNAU25O=Rrs,getString.!G
out,printlnSPtdQS!G
out,printlnstrNAU25O=!G
out,printlnSP7tdQS!G
String strN8U<;IS51=Rrs,getString/!G
out,printlnSPtdQS!G
out,printlnstrN8U<;IS51=!G
out,printlnSP7tdQS!G
String strN1'I2IONRrs,getString*!G
out,printlnSPtdQS!G
out,printlnstrN1'I2ION!G
out,printlnSP7tdQS!G
int intN8=IC1Rrs,getInt0!G
out,printlnSPtdQS!G
out,printlnintN8=IC1!G
out,printlnSP7tdQS!G
int intN?UAN2I2>Rrs,getInt+!G
out,printlnSPtdQS!G
out,printlnintN?UAN2I2>!G
out,printlnSP7tdQS!G
String strN'1SC=I82IONRrs,getString$!G
out,printlnSPtdQS!G
out,printlnstrN'1SC=I82ION!G
out,printlnSP7tdQP7trQS!G
String insNquer& RSINS1=2 IN2O tempNdetail DA;U1S Y,Y,Y,Y,Y,Y,Y,Y,Y!SG
8reparedStatement statNinsR conn,prepareStatementinsNquer&!G
statNins,setInt),intN<OOHI'!G
statNins,setInt",intNCA21GO=>I'!G
statNins,setString-,strN2I2;1!G
statNins,setString.,strNAU25O=!G
statNins,setString/,strN8U<;IS51=!G
statNins,setString*,strN1'I2ION!G
statNins,setInt0,intN8=IC1!G
statNins,setInt+,intN?UAN2I2>!G
statNins,setString$,strN'1SC=I82ION!G
int : R statNins,e:ecuteUpdate!G
S&stem,out,println:!G
X
String strNctrRString,%alueOfctr!G
session,putDalueSctrN%alS,strNctr!G
]Q
P7tableQ
PbrQ
Pinput t&peRSsubmitS %alueRS Add to Cart S nameRSAddSQ
P7formQ
P]
rs,close!G
stm,close!G
X
catch1:ception e!UX
X
else
U
response,send=edirectSUnauthorised,htmS!G
X
]Q
P7bod&Q
P7htmlQ
InterNCart,3sp
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS ]Q
P]
int iG
String boo4idRnullG
String userNsrcRnullG
userNsrcRString!session,getDalueSuserS!G
if userNsrcWRnull!
U
int counterR#G
counterRInteger,parseIntString!session,getDalueSctrN%alS!!G
int ctrR#G
foriR)GiPRcounterGi__!
U
ifrequest,get8arameterSch4S_i!WRnull!
U
boo4idRrequest,get8arameterSch4S_i!G
ctrRctr_)G
session,putDalueSch4N%arS_ctr,boo4id!G
X
X
session,putDalueS2otalSelS,String,%alueOfctr!!G
response,send=edirectSCart,3spS!G
X
else
U
response,send=edirectSUnauthorised,htmS!G
X
]Q
Cart,3sp
PhtmlQ
PheadQ
PtitleQShopping CartP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
P7C1N21=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS importRS3a%a,sql,JS ]Q
P]
int iG
String userNsrcRnullG
userNsrcRString!session,getDalueSuserS!G
if userNsrcWRnull!
U
int counterR#G
counterRInteger,parseIntString!session,getDalueS2otalSelS!!G
intZ[ boo4idRnew intZcounter[G
Connection connG
connRnullG
=esultSet rsG
rsRnullG
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
conn R'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
8reparedStatement statRnullG
int ctrR#,boo4priceR#G
foriR)GiPRcounterGi__!
U
ifString!session,getDalueSch4N%arS_i!WRnull!
U
boo4idZi(
)[RInteger,parseIntString!session,getDalueSch4N%arS_i!!G
X
X
session,putDalueS<oo4ArrS,boo4id!G
]Q
Ph-Q>our Cart 'etails are as followsBP7h-Q
Pform nameRSshopS actionRSCartN?uantit&,3spSQ
Ptable borderR)Q
PtrQ
PtdQS,NoP7tdQ
PtdQ<oo4 NameP7tdQ
PtdQ8rice in =s,!P7tdQ
P7trQ
P]
int priceR#G
for int 3R)G3PRcounterG3__!
U
out,printlnSPtrQPtdQS_3!G
String quer&RSselect title, price from boo4Ndetails where
boo4idRYSG
statR conn,prepareStatementquer&!G
stat,setInt),boo4idZ3()[!G
rs R stat,e:ecute?uer&!G
while rs,ne:t!!
U
out,printlnSPtdQS!G
out,printlnrs,getString)!!G
out,printlnSPtdQS!G
priceRrs,getInt"!G
out,printlnprice!G
X
rs,close!G
boo4priceRboo4price_priceG
session,putDalueSb8riceS,String,%alueOfboo4price!!G
out,printlnSP7trQS!G
X
=esultSet rscomboRnullG
String quer&)RSselect J from categor&NdetailsSG
8reparedStatement statNcombo R conn,prepareStatementquer&)!G
rscomboRstatNcombo,e:ecute?uer&!G]Q
PtrQ
Ptd colspanR-Q2otal Cart Amountin =s,!R
P]Rboo4price]QPtdQ
P7trQ
P7tableQ
PbrQ
Pinput t&peRsubmit %alueRS8lace OrderSQ
P7formQ
PbrQPhrQPh-QSearch MoreP7h-Q
Pform nameRSsearchS actionRSNewSearch,3spS methodRS8OS2SQ
Ptable borderR)Q
PtrQ
PtdQPinput t&peRSradioS %alueRSCategor&S chec4ed
nameRS=)SQP7tdQ
PtdQSearch based on Categor&P7tdQ
PtdQ
Pselect siCeRS)S nameRS<oo4Categor&SQ
Poption selected %alueRSSelectSQSelect Categor&P7optionQ
P]
whilerscombo,ne:t!!
U
String categor&Rrscombo,getString"!G
]Q
Poption %alueRSP]Rcategor&]QSQP]Rcategor&
]QP7optionQ
P]X]Q
P7selectQ
P7tdQ
P7trQ
PtrQ
PtdQPinput t&peRSradioS nameRS=)S %alueRS2itleSQP7tdQ
PtdQSearch b& <oo4 2itleP7tdQ
PtdQPinput t&peRSte:tS nameRS<oo42itleS siCeRS"/SQP7tdQ
P7trQ
PtrQ
PtdQPinput t&peRSradioS nameRS=)S %alueRSAuthorSQP7tdQ
PtdQSearch b& <oo4 AuthorP7tdQ
PtdQPinput t&peRSte:tS nameRS<oo4AuthorS siCeRS"/SQP7tdQ
P7trQ
PtrQ
PtdQPinput t&peRSradioS nameRS=)S %alueRS8ublisherSQP7tdQ
PtdQSearch b& <oo4 8ublisherP7tdQ
PtdQPinput t&peRSte:tS nameRS<oo48ublisherS siCeRS"/SQP7tdQ
P7trQ
PtrQ
PtdQPinput t&peRSradioS nameRS="S %alueRSASQAd%anced
SearchP7tdQ
PtdQPinput t&peRSradioS nameRS="S %alueRSNS chec4edQNew
SearchP7tdQ
PtdQPinput t&peRsubmit %alueRSSearchSQP7tdQ
P7trQ
P7tableQ
P7formQ
P]X
else
U
response,send=edirectSUnauthorised,htmS!G
X
]Q
P7bod&Q
P7htmlQ
CartNquantit&,3sp
PhtmlQ
PheadQ
PtitleQShopping CartP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
P7C1N21=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS importRS3a%a,sql,JS ]Q
P]
int iG
String userNsrcRnullG
userNsrcRString!session,getDalueSuserS!G
if userNsrcWRnull!
U
int counterR#G
counterRInteger,parseIntString!session,getDalueS2otalSelS!!G]Q
Pscript languageRS9a%ascriptSQ
function chec4Nsum!
U
%ar costR#G
:Na%lqt&Rnew Arra&P]Rcounter]Q!G
&Norderqt&Rnew Arra&P]Rcounter]Q!G
CNpriceRnew Arra&P]Rcounter]Q!G
for %ar iR#GiPP]Rcounter]QGi__!
U
CNpriceZi[Rdocument,shop,elementsZiJ.[,%alue!G
:Na%lqt&Zi[Rdocument,shop,elementsZiJ._)[,%alueG
&Norderqt&Zi[Rdocument,shop,elementsZiJ._"[,%alueG
ifparseInt&Norderqt&Zi[!P#!
U
alertS<oo4 quantit& cannot be Negati%eS!G
return falseG
X
if parseInt:Na%lqt&Zi[!PparseInt&Norderqt&Zi[!!
U
alertSOrder ?uantit& Cannot be greater than a%ailable
quantit&S!G
return falseG
X
else
U
document,shop,elementsZiJ._-[,%alueRparseInt&Norderqt&Zi[!!JparseIntCNpriceZi[!!!G
costRcost_parseIntdocument,shop,elementsZiJ._-[,%alue!G
X
X
document,shop,totN%al,%alueRcostG
X
P7scriptQ
P]
intZ[ boo4idRnew intZcounter[G
Connection connG
connRnullG
=esultSet rsG
rsRnullG
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
conn R'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
8reparedStatement statRnullG
int ctrR#,boo4priceR#G
foriR)GiPRcounterGi__!
U
ifString!session,getDalueSch4N%arS_i!WRnull!
U
boo4idZi(
)[RInteger,parseIntString!session,getDalueSch4N%arS_i!!G
X
X
session,putDalueS<oo4ArrS,boo4id!G
]Q
Ph-Q>our Cart 'etails are as followsBP7h-Q
Pform nameRSshopS actionRSShop,3spS methodRS8OS2SQ
Ptable borderR)Q
PtrQ
PtdQS,NoP7tdQ
PtdQ<oo4 NameP7tdQ
PtdQ8rice per unit in =s,!P7tdQ
PtdQ?uantit& A%ailableP7tdQ
PtdQ?uantit& 8urchasedP7tdQ
PtdQAmountP7tdQ
P7trQ
P]
int priceR#G
int qt&Na%blR#G
for int 3R)G3PRcounterG3__!
U
out,printlnSPtrQPtdQS_3!G
out,printlnSP7tdQS!G
String quer&RSselect title, price,quantit& from boo4Ndetails where
boo4idRYSG
statR conn,prepareStatementquer&!G
stat,setInt),boo4idZ3()[!G
rs R stat,e:ecute?uer&!G

while rs,ne:t!!
U
out,printlnSPtdQS!G
out,printlnrs,getString)!!Gout,printlnSP7tdQS!G
priceRrs,getInt"!G]Q
PtdQPinput t&peRShiddenS nameRSb4NpriceP]R3]QS
%alueRP]Rprice]QP7tdQ
P]out,printlnprice!G
qt&Na%blRrs,getInt-!G]Q
PtdQPinput t&peRhidden nameRSqt&Na%lP]R3]QS %alueRP
]Rqt&Na%bl]QQP]Rqt&Na%bl]QP7tdQ
PtdQPinput t&peRte:t nameRSqt&P]R3]QS %alueRS#S
onChangeRSreturn chec4Nsum!GSQP7tdQ
PtdQPinput t&peRte:t nameRScalNamtP]R3]QSQP7tdQ
P]
X]Q
P7trQ
P]
rs,close!G
boo4priceRboo4price_priceG
session,putDalueSb8riceS,String,%alueOfboo4price!!G
out,printlnSP7trQS!G
X]Q
PtrQPtdQPtdQPtdQPtdQPtdQ2otal Amountin =s,!PtdQPinput t&peRSte:tS
nameRStotN%alS %alueRS#SQP7tdQP7trQ
P7tableQ
PbrQ
Pinput t&peRsubmit %alueRS8lace OrderSQ
P7formQ
PbrQPhrQ
P]X
else
U
response,send=edirectSUnauthorised,htmS!G
X
]Q
P7bod&Q
P7htmlQ
NewSearch,3sp
PhtmlQ
PheadQ
PtitleQSearch =esultsP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
P7C1N21=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS importRS3a%a,sql,JS ]Q
P]
String userNsrcRString!session,getDalueSuserS!G
if userNsrcWRnull!
U
String strNsearch%arRnullG
String strNcol%arRnullG
String quer&RSSG
String tabN%arRSSG
int totalNselRInteger,parseIntString!session,getDalueS2otalSelS!!G
intZ[ oldNboo4idRnew intZtotalNsel[G
Connection connG
connRnullG
=esultSet rsG
rsRnullG
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
conn R'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
8reparedStatement statRnull,statNinsRnull,statNdelRnullG
for int iR)GiPRtotalNselGi__!
U
oldNboo4idZi()[RInteger,parseIntString!session,getDalueSch4N%arS_i!!G
X]Q
Ph-Q>our Cart 'etails are as followsBP7h-Q
Pform nameRSshopS actionRSCartNquantit&,3spSQ
Ptable borderR)Q
PtrQ
PtdQS,NoP7tdQ
PtdQ<oo4 NameP7tdQ
PtdQ8rice in =s,!P7tdQ
P7trQ
P]
int priceR#G int boo4priceR#G
for int 3R#G3PtotalNselG3__!
U
out,printlnSPtrQPtdQS_3_)!G
quer&RSselect title, price from boo4Ndetails where boo4idRYSG
statR conn,prepareStatementquer&!G
stat,setInt),oldNboo4idZ3[!G
rs R stat,e:ecute?uer&!G
while rs,ne:t!!
U
out,printlnSPtdQS!G
out,printlnrs,getString)!!G
out,printlnSPtdQS!G
priceRrs,getInt"!G
out,printlnprice!G
X
rs,close!G
boo4priceRboo4price_priceG
out,printlnSP7trQS!G
X]Q
PtrQ
Ptd colspanR-Q2otal Cart Amountin =s,!R
P]Rboo4price]Q
PtdQP7trQ
P7tableQ
PbrQ
Pinput t&peRsubmit %alueRS8lace OrderSQ
P7formQ
P]
String testNsrcRnullG
int ch4NctrR#G
ifrequest,get8arameterS=)S!,equalsS2itleS!!
U
strNsearch%arRrequest,get8arameterS<oo42itleS!G
strNcol%arRS2itleSG
X
ifrequest,get8arameterS=)S!,equalsSCategor&S!!
U
ch4NctrR)G
strNsearch%arRrequest,get8arameterS<oo4Categor&S!G
strNcol%arRSCategor&nameSG
X
ifrequest,get8arameterS=)S!,equalsS8ublisherS!!
U
strNsearch%arRrequest,get8arameterS<oo48ublisherS!G
strNcol%arRS8ublisherSG
X
ifrequest,get8arameterS=)S!,equalsSAuthorS!!
U
strNsearch%arRrequest,get8arameterS<oo4AuthorS!G
strNcol%arRSAuthorSG
X
String ss R request,get8arameterS="S!G
if request,get8arameterS="S!RRnull!
U
tabN%arRSboo4NdetailsSG
X
else
U
77 to get the name of the table in which the search to be done(((((((
if request,get8arameterS="S!,equalsSAS!!
U
tabN%arRStempNdetailSG
X
else
U
tabN%arRSboo4NdetailsSG
X
X
77(((((((( whether search is b& categor& or other criteria(((((((((((
if ch4NctrRR#!
U
quer&RSselect a,J from S_tabN%ar_S a, categor&Ndetails b where
a,S_strNcol%ar_S R Y and a,CA21GO=>I' R b,CA21GO=>I'SG
X
else
U
quer&RSS1;1C2 a,J,b,categor&name @=OM S_tabN%ar_S
a,CA21GO=>N'12AI;S b where b,S_strNcol%ar_SRY and a,categor&idRb,categor&idSG
X
tr&
U
statRconn,prepareStatementquer&!G
stat,setString),strNsearch%ar!G
rs R stat,e:ecute?uer&!G
int ctrR#G]Q
Ph-QSearch =esults are as followsBP7h-Q
Pform nameRScartS actionRSNewInterNcart,3spS methodRS8OS2SQ
Ptable borderR)Q
PtrQ
PtdQS,NoP7tdQ
PtdQSelectP7tdQ
PtdQ<oo4 NameP7tdQ
PtdQAuthor NameP7tdQ
PtdQ8ublisherP7tdQ
PtdQ1ditionP7tdQ
PtdQ8rice in =s,!P7tdQ
PtdQ?uantit& A%ailableNos,!P7tdQ
PtdQ'escriptionP7tdQ
P7trQ
P]
String deleteNquer&RS'elete from 21M8N'12AI;SG
statNdelR conn,prepareStatementdeleteNquer&!G
String insNquer&RnullG
int intN<OOHI',intNCA21GO=>I',intN8=IC1,intN?UAN2I2>G
String
strN2I2;1,strNAU25O=,strN8U<;IS51=,strN1'I2ION,strN'1SC=I82IONG
int rsNdelRstatNdel,e:ecuteUpdate!G
whilers,ne:t!!
U
ctrRctr_)G
out,printlnSPtrQPtdQS_ctr!G
intN<OOHI'Rrs,getInt)!G
out,printlnSPtdQPinput t&peRchec4bo: nameRch4S_ctr_S
%alueRS_intN<OOHI'_SQS!G
intNCA21GO=>I'Rrs,getInt"!G
strN2I2;1Rrs,getString-!G
out,printlnSPtdQS!G
out,printlnstrN2I2;1!G
strNAU25O=Rrs,getString.!G
out,printlnSPtdQS!G
out,printlnstrNAU25O=!G
strN8U<;IS51=Rrs,getString/!G
out,printlnSPtdQS!G
out,printlnstrN8U<;IS51=!G
strN1'I2IONRrs,getString*!G
out,printlnSPtdQS!G
out,printlnstrN1'I2ION!G
intN8=IC1Rrs,getInt0!G
out,printlnSPtdQS!G
out,printlnintN8=IC1!G
intN?UAN2I2>Rrs,getInt+!G
out,printlnSPtdQS!G
out,printlnintN?UAN2I2>!G
strN'1SC=I82IONRrs,getString$!G
out,printlnSPtdQS!G
out,printlnstrN'1SC=I82ION!G
out,printlnSP7trQS!G
insNquer&RSINS1=2 IN2O 21M8N'12AI;
DA;U1SY,Y,Y,Y,Y,Y,Y,Y,Y!SG
statNinsRconn,prepareStatementinsNquer&!G
statNins,setInt),intN<OOHI'!G
statNins,setInt",intNCA21GO=>I'!G
statNins,setString-,strN2I2;1!G
statNins,setString.,strNAU25O=!G
statNins,setString/,strN8U<;IS51=!G
statNins,setString*,strN1'I2ION!G
statNins,setInt0,intN8=IC1!G
statNins,setInt+,intN?UAN2I2>!G
statNins,setString$,strN'1SC=I82ION!G
int rsNinsRstatNins,e:ecuteUpdate!G
X
String strNctrRString,%alueOfctr!G
session,putDalueSctrN%alS,strNctr!G
]Q
P7tableQ
Pinput t&peRSsubmitS %alueRS Add to Cart S nameRSAddSQ
P7formQ
P]
=esultSet rscomboRnullG
String quer&)RSselect J from categor&NdetailsSG
8reparedStatement statNcombo R conn,prepareStatementquer&)!G
rscomboRstatNcombo,e:ecute?uer&!G]Q
PbrQPh-QSearch =esults are as followsBP7h-Q
Pform nameRSnewsrcS actionRSNewSearch,3spS methodRS8OS2SQ
Ptable borderR)Q
PtrQ
PtdQPinput t&peRSradioS %alueRSCategor&S chec4ed nameRS=)SQP7tdQ
PtdQSearch based on Categor&P7tdQ
PtdQ
Pselect siCeRS)S nameRS<oo4Categor&SQ
Poption selected %alueRSSelectSQSelect Categor&P7optionQ
P]
whilerscombo,ne:t!!
U
String categor&Rrscombo,getString"!G
]Q
Poption %alueRSP]Rcategor&]QSQP]Rcategor&]QP7optionQ
P]X]Q
P7selectQ
P7tdQ
P7trQ
PtrQ
PtdQPinput t&peRSradioS nameRS=)S %alueRS2itleSQP7tdQ
PtdQSearch b& <oo4 2itleP7tdQ
PtdQPinput t&peRSte:tS nameRS<oo42itleS siCeRS"/SQP7tdQ
P7trQ
PtrQ
PtdQPinput t&peRSradioS nameRS=)S %alueRSAuthorSQP7tdQ
PtdQSearch b& <oo4 AuthorP7tdQ
PtdQPinput t&peRSte:tS nameRS<oo4AuthorS siCeRS"/SQP7tdQ
P7trQ
PtrQ
PtdQPinput t&peRSradioS nameRS=)S %alueRS8ublisherSQP7tdQ
PtdQSearch b& <oo4 8ublisherP7tdQ
PtdQPinput t&peRSte:tS nameRS<oo48ublisherS siCeRS"/SQP7tdQ
P7trQ

PtrQ
PtdQPinput t&peRSradioS nameRS="S %alueRSASQAd%anced SearchP7tdQ
PtdQPinput t&peRSradioS nameRS="S %alueRSNS chec4edQNew
SearchP7tdQ
PtdQPinput t&peRsubmit %alueRSSearchSQP7tdQ
P7trQ
P7tableQ
P7formQ
P]X
catch1:ception 1!
U
out,printlnS1rror S_1!G
X
finall&Uconn,close!GX
X
else
U
response,send=edirectSUnauthorised,htmS!G
X
]Q
P7bod&Q
P7htmlQ
Shop,3sp
PhtmlQ
PheadQ
PtitleQOrder 'etailsP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
P7C1N21=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS importRS3a%a,sql,JS ]Q
P]
if session,getDalueSuserS!WRnull!
U]Q
Pscript languageRS9a%ascriptSQ
function %alidate!
U
%ar r R document,form)G
%ar creditcardRr,Card,%alueG
%ar &ear R r,>ear,%alueG
%ar month R r,Month,%alueG
%ar da& R r,'a&,%alueG

ifcreditcard,lengthWR)*!
U
alertSIn%alid Credit Card NumberS!G
r,Card,focus!G
returnG
X
77(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
ifda&RRSSelect 'a&S!
U
alertS8lease select the da&S!G
r,'a&,focus!G
returnG
X
77(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
ifmonthRRSSelect MonthS!
U
alertS8lease select the monthS!G
r,Month,focus!G
returnG
X
77(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
if&ear,lengthRR#!
U
alertS8lease enter the &earS!G
r,>ear,focus!G
X
else if &ear,lengthWR.!
U
alertS8lease enter the &ear in >>>> formatS!G
r,>ear,focus!G
X
77(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
if month RR S-S VV month RR S/S VV month RR S+S VV month RR S)#S! \\ da& RR
S-)S!!
U
alertS8lease enter a %alid dateS!G
r,'a&,focus!G
X
if month RR S)S! \\ da& RR S-#S VV da& RR S-)S!!
U
alertS8lease enter a %alid dateS!G
r,'a&,focus!G
X

77((((((( 2o chec4 that card date is not less than current date((((((((((
%ar %rNda&G
%ar %rNmonthG
%ar %rN&earG
%ar dRnew 'ate!G
%rN&earRd,get@ull>ear!G
%rNmonthRd,getMonth!G
%rNda&Rd,get'ate!G
ifparseInt%rN&ear!QparseIntdocument,form),>ear,%alue!!
U
alertS>ear cannot be less than Current >earS!G
return falseG
X
else ifparseInt%rN&ear!RRparseIntdocument,form),>ear,%alue!!
U
ifparseInt%rNmonth!QparseIntdocument,form),Month,%alue!!
U
alertSMonth cannot be less than Current MonthS!G
return falseG
X
else ifparseInt%rNmonth!RRparseIntdocument,form),Month,%alue!!
U
ifparseInt%rNda&!QparseIntdocument,form),'a&,%alue!!
U
alertS'a& cannot be less than current 'a&S!G
return falseG
X
X
X
77((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
document,form),submit!G
document,formsZ#[,actionRS@inal,3spSG
X
P7scriptQ
P]
int counterR#G
counterRInteger,parseIntString!session,getDalueS2otalSelS!!G
String quer&RSSG
intZ[ boo4idRnew intZcounter[G
intZ[ b4NpriceRnew intZcounter[G
intZ[ b4Nquantit&Rnew intZcounter[G
Connection connG
connRnullG
=esultSet rsG
rsRnullG
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
conn R'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
8reparedStatement statRnullG
int ctrR#,boo4priceR#G
int iR)G
whileiPRcounter!
U
ifString!session,getDalueSch4N%arS_i!WRnull!
U
boo4idZi(
)[RInteger,parseIntString!session,getDalueSch4N%arS_i!!G
quer&RSS1;1C2 8=IC1 @=OM <OOHN'12AI;S
651=1 <OOHI'RYSG
statRconn,prepareStatementquer&!G
stat,setInt),boo4idZi()[!G
rsRstat,e:ecute?uer&!G
ifrs,ne:t!!
U
b4NpriceZi()[Rrs,getInt)!G
X
else
U
b4NpriceZi()[R#G
X
X
ifrequest,get8arameterSqt&S_i!WRnull!
U
b4Nquantit&Zi(
)[RInteger,parseIntrequest,get8arameterSqt&S_i!!G
String sessN%arRString,%alueOfb4Nquantit&Zi()[!G
session,putDaluesessN%ar,String,%alueOfb4Nquantit&Zi(
)[!!G
X
boo4priceRboo4price_b4NpriceZi()[Jb4Nquantit&Zi()[!G
i__G
X
session,putDalueSb8riceS,String,%alueOfboo4price!!G
]Q
Pform methodRS8OS2S actionRS@inal,3spS nameRSform)SQ
Ptable widthRS0#]SQ
PtrQ
Ptd colspanR. QPbQ2otal Amount in =s,! is B P]Rboo4price
]QP7bQP7tdQP7trQ
PtrQ
P7trQ
PtrQ
PtdQPfont siCeRS-SQPbQCredit Card NumberB P7bQP7fontQP7tdQ
Ptd colspanR-Q
Pinput t&peRSte:tS nameRSCardS siCeRS-$S ma:lengthRS)*S tabRS)SQP7tdQ
P7trQ
PtrQ
PtdQPfont siCeRS-SQPbQ1:pir& 'ate B P7bQP7fontQP7tdQ
PtdQ

Pselect siCeRS)S nameRS'a&SQ
Poption %alueRSSelect 'a&SQSelect 'a&P7optionQ
Poption %alueRS)SQ)P7optionQ
Poption %alueRS"SQ"P7optionQ
Poption %alueRS-SQ-P7optionQ
Poption %alueRS.SQ.P7optionQ
Poption %alueRS/SQ/P7optionQ
Poption %alueRS*SQ*P7optionQ
Poption %alueRS0SQ0P7optionQ
Poption %alueRS+SQ+P7optionQ
Poption %alueRS$SQ$P7optionQ
Poption %alueRS)#SQ)#P7optionQ
Poption %alueRS))SQ))P7optionQ
Poption %alueRS)"SQ)"P7optionQ
Poption %alueRS)-SQ)-P7optionQ
Poption %alueRS).SQ).P7optionQ
Poption %alueRS)/SQ)/P7optionQ
Poption %alueRS)*SQ)*P7optionQ
Poption %alueRS)0SQ)0P7optionQ
Poption %alueRS)+SQ)+P7optionQ
Poption %alueRS)$SQ)$P7optionQ
Poption %alueRS"#SQ"#P7optionQ
Poption %alueRS")SQ")P7optionQ
Poption %alueRS""SQ""P7optionQ
Poption %alueRS"-SQ"-P7optionQ
Poption %alueRS".SQ".P7optionQ
Poption %alueRS"/SQ"/P7optionQ
Poption %alueRS"*SQ"*P7optionQ
Poption %alueRS"0SQ"0P7optionQ
Poption %alueRS"+SQ"+P7optionQ
Poption %alueRS"$SQ"$P7optionQ
Poption %alueRS-#SQ-#P7optionQ
Poption %alueRS-)SQ-)P7optionQ
P7selectQ
P7tdQ
PtdQ
Pselect siCeRS)S nameRSMonthSQ
Poption %alueRSSelect MonthSQSelect MonthP7optionQ
Poption %alueRS#SQ9anuar&P7optionQ
Poption %alueRS)SQ@ebruar&P7optionQ
Poption %alueRS"SQMarchP7optionQ
Poption %alueRS-SQAprilP7optionQ
Poption %alueRS.SQMa&P7optionQ
Poption %alueRS/SQ9uneP7optionQ
Poption %alueRS*SQ9ul&P7optionQ
Poption %alueRS0SQAugustP7optionQ
Poption %alueRS+SQSeptemberP7optionQ
Poption %alueRS$SQOctoberP7optionQ
Poption %alueRS)#SQNo%emberP7optionQ
Poption %alueRS))SQ'ecemberP7optionQ
P7selectQ
P7tdQ
PtdQ
Pfont siCeRS-SQPinput t&peRSte:tS nameRS>earS siCeRS))SQP7fontQ
P7tdQ
P7trQ
P7tableQ

P7fontQPinput t&peRSbuttonS %alueRSSubmitS nameRS<)S onClic4RS%alidate!GS Q
P7formQ
P]
X
else
U
response,send=edirectSUnauthorised,htmS!G
X]Q
P7bod&Q
P7htmlQ
NewInterNCart,3sp
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS ]Q
P]
int iG
String boo4idRnullG
String userNsrcRnullG
userNsrcRString!session,getDalueSuserS!G
if userNsrcWRnull!
U
int counterR#G
int totalNselRInteger,parseIntString!session,getDalueS2otalSelS!!G
counterRInteger,parseIntString!session,getDalueSctrN%alS!!G
int ctrRtotalNselG
foriR)GiPRcounterGi__!
U
ifrequest,get8arameterSch4S_i!WRnull!
U
boo4idRrequest,get8arameterSch4S_i!G
ctrRctr_)G
session,putDalueSch4N%arS_ctr,boo4id!G
X
X
session,putDalueS2otalSelS,String,%alueOfctr!!G
response,send=edirectSCart,3spS!G
X
else
U
out,printlnSUnauthorised Shopping is not allowedS!G
X
]Q
;ogout,3sp
PhtmlQ
PheadQ
PtitleQ;ogged outP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
P7C1N21=Q
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS ]Q
P]
session,in%alidate!G
]Q
PcenterQ
P<=QP<=QP<=QP<=QPbQ>ou ha%e logged out successfull&,
P<=QP<=Q=eturn to Shopping CartY Pa hrefRS;ogin,htmSQClic4 hereP7aQP7bQ
P7centerQ
P7bod&Q
P7htmlQ
@inal,3sp
PhtmlQ
PheadQ
PtitleQOrder placedP7titleQ
P7headQ
Pbod& bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q PuQOnline Shopping CartP7uQ P75)Q
P5"QOrder 'etailsP75"QP7C1N21=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P]^ page error8ageRSerrorpage,3spS languageRS3a%aS
importRS3a%a,sql,J,3a%a,util,J,3a%a,te:t,JS ]Q
P]W
int OrderI',priceG
]Q
P]
String userNsrcRString!session,getDalueSuserS!G
if userNsrcWR null!
U
tr&U
Connection connG
connRnullG
=esultSet rsRnullG
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
conn R'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
8reparedStatement stat)Rnull,statNselRnull,statNinsRnullG
OrderI'Rint!)####JMath,random!_)!G
priceRInteger,parseIntString!session,getDalueSb8riceS!!G
int counterR#G
counterRInteger,parseIntString!session,getDalueS2otalSelS!!G
intZ[ boo4idRnew intZcounter[G
intZ[ b4Nquantit&Rnew intZcounter[G
int orgNb4qt&R#G
int iR#G
String insNquer&RSSG
String selNqt&?uer&RSSG
String insNqt&RSSG
foriR)GiPRcounterGi__!
U
=esultSet rsNsqlRnullG
ifString!session,getDalueSch4N%arS_i!WRnull!
U
boo4idZi(
)[RInteger,parseIntString!session,getDalueSch4N%arS_i!!G
X
ifString!session,getDalueSboo4qt&S_i!WRnull!
U
b4Nquantit&Zi(
)[RInteger,parseIntString!session,getDalueSboo4qt&S_i!!G
X
insNquer&RSINS1=2 IN2O O='1=N'12AI;S DA;U1SY,Y,Y!SG
stat)Rconn,prepareStatementinsNquer&!G
stat),setInt),OrderI'!G
stat),setInt",boo4idZi()[!G
stat),setInt-,b4Nquantit&Zi()[!G
int rsNintR#G
rsNintRstat),e:ecuteUpdate!G
selNqt&?uer&RSS1;1C2 ?UAN2I2> @=OM <OOHN'12AI;S
651=1 <OOHI' R YSG
statNsel R conn,prepareStatementselNqt&?uer&!G
statNsel,setInt),boo4idZi()[!G
rsNsqlRstatNsel,e:ecute?uer&!G
ifrsNsql,ne:t!!
U
orgNb4qt&RrsNsql,getInt)!G
X
rsNsql,close!G
String nsNqt&RSU8'A21 <OOHN'12AI;S S12 ?UAN2I2>RY
651=1 <OOHI'RYSG
statNinsRconn,prepareStatementnsNqt&!G
statNins,setInt),orgNb4qt&(b4Nquantit&Zi()[!G
statNins,setInt",boo4idZi()[!G
rsNintRstatNins,e:ecuteUpdate!G
X
Xcatch1:ception e!UX
]Q
Pform nameRSnewsrcS methodRS8OS2SQ
P<=QPfont siCeRS-SQPbQ
>our order has been successfull& placed,
P<=QP<=QOrder Number is B P]ROrderI']Q
P<=QP<=Q2otal Amount is B P]Rprice]Q
P<=QP<=Q'ate of Order isB
P]

out,printlnnew 3a%a,util,'ate!!,to;ocaleString!!G
]Q
P<=QP<=Q
>our Order will be deli%ered within ne:t .+ wor4ing hours
P]
String cardNnoRrequest,get8arameterSCardS!G
Connection conR nullG
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
3a%a,util,'ate now R new 3a%a,util,'ate!G
'ate@ormat df) R 'ate@ormat,get'ateInstance'ate@ormat,S5O=2!G
String s) R df),formatnow!G
tr&
U
String str R Sinsert into orderNtable %aluesY,Y,Y,Y!SG
8reparedStatement statR con,prepareStatementstr!G
stat,setInt),OrderI'!G
stat,setString",userNsrc!G
stat,setInt-,price!G
stat,setString.,s)!G
int : R stat,e:ecuteUpdate!G
Xcatch1:ception e!Uout,printlne!G X
X
else
U
response,send=edirectSUnauthorised,htmS!G
X
]Q
P7bod&Q
P7htmlQ
6dm!n!&%ra%or Modu-e&
6dm!n$h%m
P52M;Q
P51A'Q
P2I2;1QAdministering Shopping CartP72I2;1Q
P751A'Q
P<O'> bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)QAdministering Online Shopping Cart P75)Q
P7C1N21=Q
PbrQPhrQPbrQPbrQ
Ph"Q6elcome AdministratorP7h"QPbrQ
P@orm nameRSadminS methodRS8OS2SQ
P2A<;1 widthR)##] borderRS#S cellpaddingRS"S cellspacingRS#SQ
P2=Q
Pth align R SleftS widthRS.]SQP7thQ
Pth align R SleftS widthRS"#]SQP7thQ
Pth align R SleftS widthRS-+]SQP7thQ
Pth align R SleftS widthRS-+]SQP7thQ
P72=Q
P2=Q
P25Q)P725Q
P25 align R SleftSQ<oo4P725Q
P25QPa hrefRSInsert,3spSQInsert New <oo4 'etailsP7aQP725Q
P25QPa hrefRSModif&,3spSQModif& <oo4 'etailsP7aQP725Q
P72=Q
P2=Q
P25Q"P725Q
P25 align R SleftSQCategor&P725Q
P25QPa hrefRSInsertNCategor&,3spSQInsert <oo4 Categor&P7aQP725Q
P25QPa hrefRSUpdateNCategor&,3spSQModif& <oo4 Categor&P7aQP725Q
P72=Q
P7<O'>Q
P752M;Q
(n&er%$)&+
P52M;Q
P51A'Q
P2I2;1QInsert New <oo4P72I2;1Q
P751A'Q
P<O'>Q
PC1N21=Q
P5)Q PuQAdministering Online Shopping CartP7uQ P75)Q
P5"Q Add <oo4P75"Q
P7C1N21=Q
P<=Q
P5=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P<O'> bgcolorRSTCC@@@@SQ
PSC=I82 languageRS9a%ascriptSQ
function chec4!
U
%ar ctrR#G
ifdocument,addboo4,title,%alueRRSS!
U
alertS8lease 1nter 2itleS!G
returnG
X
ifdocument,addboo4,author,%alueRRSS!
U
alertS8lease 1nter AuthorS!G
returnG
X
ifdocument,addboo4,pub,%alueRRSS!
U
alertS8lease 1nter 8ublisher NameS!G
returnG
X
ifdocument,addboo4,edition,%alueRRSS!
U
alertS8lease 1nter 1ditionS!G
returnG
X
ifdocument,addboo4,price,%alueRRSS!
U
alertS8lease 1nter 8rice in =s,!S!G
returnG
X

ifdocument,addboo4,qt&,%alueRRSS!
U
alertS8lease 1nter ?uantit&S!G
returnG
X
ifdocument,addboo4,desc,%alueRRSS!
U
alertS8lease 1nter 'escriptionS!G
returnG
X
ifisNaNdocument,addboo4,price,%alue!!
U
alertS8lease 1nter a numeric %alue for 8rice in =s,!S!G
ctrR)G
X
ifisNaNdocument,addboo4,qt&,%alue!!
U
alertS8lease 1nter a numeric %alue for ?uantit&S!G
ctrR)G
X
ifctrRR#!
U
document,formsZ#[,actionRSAdd<oo4,3spSG
document,formsZ#[,submit!G
X
else
U
return trueG
XG

X
P7SC=I82Q
P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
77Statement stat R nullG
8reparedStatement stat R nullG
77Statement stat) R nullG
8reparedStatement stat) R nullG
=esultSet rs R nullG
=esultSet rs) R nullG
String quer&RnullG
String quer&)RnullG
int ctrR#, flagR#G
tr&
U
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
quer&RSSelect a,J,b,categor&name from boo4Ndetails a, categor&Ndetails b where
a,categor&idRb,categor&idSG
quer&)RSselect J from categor&NdetailsSG
stat R con,prepareStatementquer&!G
stat) R con,prepareStatementquer&)!G
rsRstat,e:ecute?uer&!G
rs)Rstat),e:ecute?uer&!G
]Q
PbrQPh-Q;ist of A%ailable <oo4sBP7h-Q
Ptable borderR)Q
PtrQ
PtdQS,NoP7tdQ
PtdQ<oo4 IdP7tdQ
PtdQ<oo4 NameP7tdQ
PtdQAuthor NameP7tdQ
PtdQ8ublisherP7tdQ
PtdQ1ditionP7tdQ
PtdQ8rice in =s,!P7tdQ
PtdQ?uantit& A%ailableNos,!P7tdQ
PtdQ'escriptionP7tdQ
PtdQCategor&P7tdQ
P7trQ
P]
int intN<OOHI',intNCA21GO=>I',intN8=IC1,intN?UAN2I2>G
String
strN2I2;1,strNAU25O=,strN8U<;IS51=,strN1'I2ION,strN'1SC=I82IONG
whilers,ne:t!!
U
ctrRctr_)G
out,printlnSPtrQPtdQS_ctr!G
intN<OOHI'Rrs,getInt)!G
out,printlnSPtdQS!G
out,printlnintN<OOHI'!G
intNCA21GO=>I'Rrs,getInt"!G
strN2I2;1Rrs,getString-!G
out,printlnSPtdQS!G
out,printlnstrN2I2;1!G
strNAU25O=Rrs,getString.!G
out,printlnSPtdQS!G
out,printlnstrNAU25O=!G
strN8U<;IS51=Rrs,getString/!G
out,printlnSPtdQS!G
out,printlnstrN8U<;IS51=!G
strN1'I2IONRrs,getString*!G
out,printlnSPtdQS!G
out,printlnstrN1'I2ION!G
intN8=IC1Rrs,getInt0!G
out,printlnSPtdQS!G
out,printlnintN8=IC1!G
intN?UAN2I2>Rrs,getInt+!G
out,printlnSPtdQS!G
out,printlnintN?UAN2I2>!G
strN'1SC=I82IONRrs,getString$!G
out,printlnSPtdQS!G
out,printlnstrN'1SC=I82ION!G
out,printlnSPtdQS!G
out,printlnrs,getString)#!!G
out,printlnSP7trQS!G
X
out,printlnSP7tableQS!G]Q
PbrQ
PhrQ
Ph-Q Add New <oo4 'etailsP7h-Q
Pform nameRSaddboo4SQ
Ptable borderR)Q
PtrQPtdQ<oo4 2itleP7tdQPtdQPinput t&peRSte:tS nameRStitleSQP7tdQ
PtrQPtdQAuthor NameP7tdQPtdQPinput t&peRSte:tS nameRSauthorSQP7tdQ
PtrQPtdQ8ublisherP7tdQPtdQPinput t&peRSte:tS nameRSpubSQP7tdQ
PtrQPtdQ1ditionP7tdQPtdQPinput t&peRSte:tS nameRSeditionSQP7tdQ
PtrQPtdQ8rice in =s,!P7tdQPtdQPinput t&peRSte:tS nameRSpriceSQP7tdQ
PtrQPtdQ?uantit& A%ailableNos,!P7tdQPtdQPinput t&peRSte:tS
nameRSqt&SQP7tdQ
PtrQPtdQ'escriptionP7tdQPtdQPinput t&peRSte:tS nameRSdescSQP7tdQ
PtrQPtdQCategor&P7tdQPtdQPselect siCeRS)S nameRScatSQ
P]
whilers),ne:t!!
U]Q
Poption %alueRSP]Rrs),getString)!]QSQP
]Rrs),getString"!]QP7optionQ
P]X]Q
P7selectQP7tdQ
P7trQ
PtrQPtdQPinput t&peRSsubmitS %alueRS Add S
onClic4RSchec4!GSQP7tdQ
PtdQPinput t&peRS=esetS %alueRS Clear SQP7tdQ
P7tableQ
P7formQ
P]
X
catch1:ception e!
U
out,printS1rror R S _ e _ SP5=QS!G
X
]Q
P7<O'>Q
P752M;Q
Mod!#y$)&+
P52M;Q
P51A'Q
P2I2;1QModif& <oo4 'etailsP72I2;1Q
P751A'Q
P<O'> bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q Administering Online Shopping Cart P75)Q
P5"QModif& <oo4 'etailsP75"Q
P7C1N21=Q
P<=Q
P5=Q
P<=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
8reparedStatement stat R nullG
=esultSet rs R nullG
String quer&RnullG
int ctrR#G
tr&
U
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
quer&RSSelect a,J,b,categor&name from boo4Ndetails a, categor&Ndetails b
where a,categor&idRb,categor&idSG
stat R con,prepareStatementquer&!G
rsRstat,e:ecute?uer&!G
]Q
PbrQPh-Q;ist of A%ailable <oo4sBP7h-Q
Pform nameRSModS actionRSModif&N<oo4,3spSQ
Ptable borderR)Q
PtrQ
PtdQS,NoP7tdQ
PtdQ<oo4 IdP7tdQ
PtdQ<oo4 NameP7tdQ
PtdQAuthor NameP7tdQ
PtdQ8ublisherP7tdQ
PtdQ1ditionP7tdQ
PtdQ8rice in =s,!P7tdQ
PtdQ?uantit& A%ailableNos,!P7tdQ
PtdQ'escriptionP7tdQ
PtdQCategor&P7tdQ
P7trQ
P]
int intN<OOHI',intNCA21GO=>I',intN8=IC1,intN?UAN2I2>G
String
strN2I2;1,strNAU25O=,strN8U<;IS51=,strN1'I2ION,strN'1SC=I82IONG
whilers,ne:t!!
U
ctrRctr_)G
out,printlnSPtrQPtdQS_ctr!G
intN<OOHI'Rrs,getInt)!G
out,printlnSPtdQS!G
out,printlnSPinput t&peRradio nameR=)
%alueRS_intN<OOHI'_SQS!G
intNCA21GO=>I'Rrs,getInt"!G
strN2I2;1Rrs,getString-!G
out,printlnSPtdQS!G
out,printlnstrN2I2;1!G
strNAU25O=Rrs,getString.!G
out,printlnSPtdQS!G
out,printlnstrNAU25O=!G
strN8U<;IS51=Rrs,getString/!G
out,printlnSPtdQS!G
out,printlnstrN8U<;IS51=!G
strN1'I2IONRrs,getString*!G
out,printlnSPtdQS!G
out,printlnstrN1'I2ION!G
intN8=IC1Rrs,getInt0!G
out,printlnSPtdQS!G
out,printlnintN8=IC1!G
intN?UAN2I2>Rrs,getInt+!G
out,printlnSPtdQS!G
out,printlnintN?UAN2I2>!G
strN'1SC=I82IONRrs,getString$!G
out,printlnSPtdQS!G
out,printlnstrN'1SC=I82ION!G
out,printlnSPtdQS!G
out,printlnrs,getString)#!!G
out,printlnSP7trQS!G
X
]Q
PtrQ
PtdQPinput t&peRSsubmitS %alueRS Modif& SQP7tdQ
PtdQPinput t&peRS=esetS %alueRS Clear SQP7tdQ
P7trQ
P7tableQ
P7formQ
P]
X
catch1:ception e!
U
out,printS1rror R S _ e _ SP5=QS!G
X
]Q
P7<O'>Q
P752M;Q
6dd/oo2$)&+
P52M;Q
P51A'Q
P2I2;1QInsert New <oo4P72I2;1Q
P751A'Q
P<O'> bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q Administering Online Shopping Cart P75)Q
P5"QAdd <oo4P75"Q
P7C1N21=Q
P<=Q
P5=Q
P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
8reparedStatement stat R nullG
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
=esultSet rs) R nullG
int rsG
String quer&RnullG
String quer&)RnullG
String 2I2;1G
2I2;1Rrequest,get8arameterStitleS!G
quer&)RSSelect a,J from boo4Ndetails a where a,titleRYSG
8reparedStatement stat)R con,prepareStatementquer&)!G
stat),setString),2I2;1!G
rs)Rstat),e:ecute?uer&!G
ifrs),ne:t!!
U
]Q
PSC=I82 languageRS9a%aScriptSQ
alertS2his boo4 alread& e:ists,S!G
location,hrefRSInsert,3spSG
P7SC=I82Q
P]
X
else
U
int intN<OOHI',intNCA21GO=>I',intN8=IC1,intN?UAN2I2>G
String
strN2I2;1,strNAU25O=,strN8U<;IS51=,strN1'I2ION,strN'1SC=I82IONG
intN<OOHI'Rint!)####JMath,random!_)!G
intNCA21GO=>I'RInteger,parseIntrequest,get8arameterScatS!!G
strN2I2;1Rrequest,get8arameterStitleS!G
strNAU25O=Rrequest,get8arameterSauthorS!G
strN8U<;IS51=Rrequest,get8arameterSpubS!G
strN1'I2IONRrequest,get8arameterSeditionS!G
intN8=IC1RInteger,parseIntrequest,get8arameterSpriceS!!G
intN?UAN2I2>RInteger,parseIntrequest,get8arameterSqt&S!!G
strN'1SC=I82IONRrequest,get8arameterSdescS!G

quer&RSinsert into boo4Ndetails %alues Y,Y,Y,Y,Y,Y,Y,Y,Y!SG
stat R con,prepareStatementquer&!G
stat,setInt),intN<OOHI'!G
stat,setInt",intNCA21GO=>I'!G
stat,setString-,strN2I2;1!G
stat,setString.,strNAU25O=!G
stat,setString/,strN8U<;IS51=!G
stat,setString*,strN1'I2ION!G
stat,setInt0,intN8=IC1!G
stat,setInt+,intN?UAN2I2>!G
stat,setString$,strN'1SC=I82ION!G
rsRstat,e:ecuteUpdate!G
ifrsRR)!
U]Q
P<=Q
P5-QSuccessfull& inserted the data,P75-Q
P] X
else
U]Q
P<=Q
P5-QCould not add the boo4P75-Q
P]X
X]Q
P<=Q
Pa hrefRS;ogout,3spSQClic4 here to logoutP7aQ
P<=QP<=Q
Pa hrefRSAdmin,htmSQClic4 here to go to administrator pageP7aQ
P<=QP<=Q
Pa hrefRSInsert,3spSQ Clic4 here to add more boo4sP7aQ
P7<O'>Q
P752M;Q
Mod!#yD/oo2$)&+
P52M;Q
P51A'Q
P2I2;1QModif& <oo4P72I2;1Q
P751A'Q
P<O'> bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q Administering Online Shopping Cart P75)Q
P5"QModif& <oo4 'etailsP75"Q
P7C1N21=Q
P5=Q
P<=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
8reparedStatement stat R nullG
=esultSet rs R nullG
String quer&RnullG
int boo4Nsel R Integer,parseIntrequest,get8arameterS=)S!!G
tr&
U
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
quer&RSSelect a,J,b,categor&name from boo4Ndetails a, categor&Ndetails b
where a,boo4idRY and a,categor&idRb,categor&idSG
stat R con,prepareStatementquer&!G
stat,setInt),boo4Nsel!G
rsRstat,e:ecute?uer&!G
ifrs,ne:t!!
U
]Q
PbrQPh-Q'etails of Selected <oo4BP7h-Q
Pform nameRSModS actionRS@inalNModN<oo4,3spSQ
Pinput t&peRShiddenS nameRScategor&idS %alueRSP
]Rrs,getString"!]QSQ
Ptable borderR)Q
PtrQ
PtdQ<oo4 IdP7tdQPtdQPinput t&peRShiddenS nameRSboo4idS %alueRSP
]Rboo4Nsel]QSQP]Rboo4Nsel]Q P7tdQP7trQ
PtrQ
PtdQ<oo4 NameP7tdQPtdQPinput t&peRSte:tS nameRSbtitleS %alueRP
]Rrs,getString-!]QQP7tdQ
P7trQPtrQ
PtdQAuthor NameP7tdQPtdQPinput t&peRSte:tS nameRSbauthorS %alueRP
]Rrs,getString.!]QQP7tdQ
P7trQPtrQ
PtdQ8ublisherP7tdQPtdQPinput t&peRSte:tS nameRSbpubS %alueRP
]Rrs,getString/!]QQP7tdQ
P7trQPtrQ
PtdQ1ditionP7tdQPtdQPinput t&peRSte:tS nameRSbeditionS %alueRP
]Rrs,getString*!]QQP7tdQ
P7trQPtrQ
PtdQ8rice in =s,!P7tdQPtdQPinput t&peRSte:tS nameRSbpriceS %alueRP
]Rrs,getString0!]QQP7tdQ
P7trQPtrQ
PtdQ?uantit& A%ailableNos,!P7tdQPtdQPinput t&peRSte:tS nameRSbqt&S
%alueRP]Rrs,getString+!]QQP7tdQ
P7trQPtrQ
PtdQ'escriptionP7tdQPtdQPinput t&peRSte:tS nameRSbdescS %alueRP
]Rrs,getString$!]QQP7tdQ
P7trQPtrQ
PtdQCategor&P7tdQPtdQPinput t&peRSte:tS nameRSbcatS %alueRP
]Rrs,getString)#!]QQP7tdQ
P7trQPtrQ
PtrQPtdQPinput t&peRSsubmitS %alueRS Sa%e Changes SQP7tdQPtdQPinput
t&peRS=esetS %alueRS Clear SQP7tdQP7trQ
P7tableQ
P7formQ
P]
X
X
catch1:ception e!
U
out,printS1rror R S _ e _ SP5=QS!G
X
]Q
P7<O'>Q
P752M;Q
<!na-DmodD/oo2$)&+
P52M;Q
P51A'Q
P2I2;1Q<oo4 'etails ModifiedP72I2;1Q
P751A'Q
P<O'> bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q Administering Online Shopping Cart P75)Q
P5"Q<oo4 'etails ModifiedP75"Q
P7C1N21=Q
P<=Q
P5=Q
P<=Q
P<=Q
P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
77Statement stat R nullG
8reparedStatement stat R nullG
77Statement stat) R nullG
8reparedStatement stat) R nullG
=esultSet rs R nullG
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
int rsNintG
int intN<OOHI',intNCA21GO=>I',intN8=IC1,intN?UAN2I2>G
String quer&RnullG
String
strN2I2;1,strNAU25O=,strN8U<;IS51=,strN1'I2ION,strN'1SC=I82IONG
intN<OOHI'RInteger,parseIntrequest,get8arameterSboo4idS!!G
intNCA21GO=>I'RInteger,parseIntrequest,get8arameterScategor&idS!!G
strN2I2;1Rrequest,get8arameterSbtitleS!G
strNAU25O=Rrequest,get8arameterSbauthorS!G
strN8U<;IS51=Rrequest,get8arameterSbpubS!G
strN1'I2IONRrequest,get8arameterSbeditionS!G
intN8=IC1RInteger,parseIntrequest,get8arameterSbpriceS!!G
intN?UAN2I2>RInteger,parseIntrequest,get8arameterSbqt&S!!G
strN'1SC=I82IONRrequest,get8arameterSbdescS!G


quer&RSupdate boo4Ndetails set
categor&idRY,titleRY,authorRY,publisherRY,editionRY,priceRY,quantit&RY,descriptionRY
where boo4idRYSG
stat R con,prepareStatementquer&!G
stat,setInt),intNCA21GO=>I'!G
stat,setString",strN2I2;1!G
stat,setString-,strNAU25O=!G
stat,setString.,strN8U<;IS51=!G
stat,setString/,strN1'I2ION!G
stat,setInt*,intN8=IC1!G
stat,setInt0,intN?UAN2I2>!G
stat,setString+,strN'1SC=I82ION!G
stat,setInt$,intN<OOHI'!G
rsNintRstat,e:ecuteUpdate!G
if rsNintRR)!
U
out,printlnS<oo4 details for <oo4 Id S_intN<OOHI'_S
successfull& modified,S!G
X
else
U
out,printlnSSorr& 2ransaction not CompletedS!G
X
]Q
P<=QP<=Q
Pa hrefRS;ogout,3spSQClic4 here to logoutP7aQ
P<=QP<=Q
Pa hrefRSAdmin,htmSQClic4 here to go to administrator pageP7aQ
P<=QP<=Q
Pa hrefRSModif&,3spSQ Clic4 here to modif& more boo4sP7aQ
P7<O'>Q
P752M;Q
(n&er%DCa%e.ory$)&+
P52M;Q
P51A'Q
P2I2;1QInsert New Categor&P72I2;1Q
P751A'Q
P<O'> bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q Administering Online Shopping Cart P75)Q
P5"Q Add Categor&P75"Q
P7C1N21=Q
P<=Q
P5=Q
P<=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
8reparedStatement stat R nullG
=esultSet rs R nullG
String quer&RnullG
int ctrR#, flagR#G
tr&
U
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
quer&RSselect J from categor&NdetailsSG
stat R con,prepareStatementquer&!G
rsRstat,e:ecute?uer&!G
]Q
PbrQPh-QAdd New Categor&BP7h-Q
Pform nameRSaddboo4S actionRSAddCategor&,3spSQ
Ptable borderR)Q
PtrQ
PtdQCategories A%ailableP7tdQ
PtdQPselect siCeRS)S nameRScatSQ
P]
whilers,ne:t!!
U]Q
Poption %alueRSP]Rrs,getString)!]QSQP
]Rrs,getString"!]QP7optionQ
P]X]Q
P7selectQP7tdQ
P7trQ
PtrQ
PtdQCategor& to be addedP7tdQ
PtdQPinput t&peRSte:tS nameRScatNnameSQP7tdQP7trQ
PtrQPtdQPinput t&peRSsubmitS %alueRS Add SQP7tdQPtdQPinput
t&peRS=esetS %alueRS Clear SQP7tdQ
P7tableQP7formQ
P]
X
catch1:ception e!
U
out,printS1rror R S _ e _ SP5=QS!G
X
finall&
U
rs,close!G
con,close!G
X
]Q
P7<O'>Q
P752M;Q
U+da%eDCa%e.ory$)&+
P52M;Q
P51A'Q
P2I2;1QCategor& ModifiedP72I2;1Q
P751A'Q
P<O'> bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q Administering Online Shopping Cart P75)Q
P5"QCategor& ModifiedP75"Q
P7C1N21=Q
P<=Q
P5=Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P<=QP<=Q
Pscript languageRS9a%ascriptSQ
function selNclic4!
U
%ar f R document,modcatG
%ar iRf,cat,selectedInde:G
%ar strRf,cat,optionsZi[,te:tG
document,modcat,%rNcat,%alueRstrG
document,modcat,catN%al,%alueRdocument,modcat,elementsZ#[,%alueG
X
P7scriptQ
P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
8reparedStatement stat R nullG
=esultSet rs R nullG
String quer&RnullG
tr&
U
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
quer&RSselect J from categor&NdetailsSG
stat R con,prepareStatementquer&!G
rsRstat,e:ecute?uer&!G
]Q
PbrQPh"QModif& Categor&B((P7h"Q
Pform nameRSmodcatS actionRSModif&Categor&,3spSQ
Ptable borderR)Q
PtrQ
PtdQCategor&P7tdQ
PtdQPselect siCeRS)S nameRScatS onChangeRSselNclic4!GSQ
P]
whilers,ne:t!!
U]Q
Poption %alueRSP]Rrs,getString)!]QSQ
P]Rrs,getString"!]QP7optionQ
P]X]Q
P7selectQP7tdQ
P7trQ
PtrQPtd colspanR"QPinput t&peRSte:tS nameRS%rNcatSQPinput t&peRSte:tS
nameRScatN%alSQP7tdQ
PtrQPtdQPinput t&peRSsubmitS %alueRS Modif& SQP7tdQPtdQPinput
t&peRS=esetS %alueRS Clear SQP7tdQ
P7tableQP7formQ
P]
X
catch1:ception e!
U
77 out,printS1rror R S _ e _ SP5=QS!G
X
finall&
U
rs,close!G
con,close!G
X
]Q
P7<O'>Q
P752M;Q
Mod!#yCa%e.ory$)&+
P52M;Q
P51A'Q
P2I2;1QModif& Categor&P72I2;1Q
P751A'Q
P<O'> bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q Administering Online Shopping Cart P75)Q
P7C1N21=Q
P<=Q
P5=Q
P<=Q
P<=Q
P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
8reparedStatement stat R nullG
int rs R #G
String quer&RnullG
tr&
U
String newNcatRSSG
int catNidR#G
newNcatRrequest,get8arameterS%rNcatS!G
catNidRInteger,parseIntrequest,get8arameterScatN%alS!!G
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
quer&RSU8'A21 categor&Ndetails S12 CA21GO=>NAM1RY 651=1
CA21GO=>I'RYSG
stat R con,prepareStatementquer&!G
stat,setString),newNcat!G
stat,setInt",catNid!G
rsRstat,e:ecuteUpdate!G
if rsRR)!
U
out,printlnSCategor& Successfull& ModifiedS!G
X
else
U
out,printlnS2ransaction Not AllowedS!G
X
X
catch1:ception e!
U
out,printS1rror R S _ e _ SP5=QS!G
X
finall&
U
con,close!G
X
]Q
P<=Q
P<=Q
Pa hrefRS;ogout,3spSQClic4 here to logoutP7aQ
P<=QP<=Q
Pa hrefRSAdmin,htmSQClic4 here to go to administrator pageP7aQ
P<=QP<=Q
Pa hrefRSUpdateNCategor&,3spSQ Clic4 here to modif& more
categoriesP7aQ
P7<O'>Q
P752M;Q
6ddCa%e.ory$)&+
P52M;Q
P51A'Q
P2I2;1QInsert New Categor&P72I2;1Q
P751A'Q
P<O'> bgcolorRSTCC@@@@SQ
PC1N21=Q
P5)Q Administering Online Shopping Cart P75)Q
P5"Q Add Categor&P75"Q
P7C1N21=Q
P<=Q
P5=Q
P<=Q
P]^ page error8ageRSerrorpage,3spS importRS3a%a,net,JS ]Q
P]^ page importRS3a%a,io,JS ]Q
P]^ page importRS3a%a,sql,JS ]Q
P]
Connection con R nullG
8reparedStatement stat R nullG
Class,forNameSsun,3dbc,odbc,9dbcOdbc'ri%erS!G
con R 'ri%erManager,getConnectionS3dbcBodbcB'ataS,SscottS,StigerS!G
int rsG
int intNCA21GO=>I'G
String quer&RnullG
String strNCA21GO=>G
intNCA21GO=>I'Rint!)####JMath,random!_)!G
strNCA21GO=>Rrequest,get8arameterScatNnameS!G


quer&RSinsert into CA21GO=>Ndetails %alues Y,Y!SG
stat R con,prepareStatementquer&!G
stat,setInt),intNCA21GO=>I'!G
stat,setString",strNCA21GO=>!G

rsRstat,e:ecuteUpdate!G
if rsRR)!
U
]QP5-QNew Categor& Successfull& AddedP75-QP]
X
else
U
]QP5-Q2ransaction Not AllowedP75-QP]
X
]Q
P<=Q
Pa hrefRS;ogout,3spS QPfont siCeRS.S QClic4 here to ;ogoutP7fontQP7aQ
P<=QP<=Q
Pa hrefRSAdmin,htmSQPfont siCeRS.S QClic4 here to go to administrator
pageP7fontQP7aQ
P<=QP<=Q
Pa hrefRSInsertNCategor&,3spSQPfont siCeRS.S Q Clic4 here to add more
categoriesP7fontQP7aQ
P<=QP<=Q
P7<O'>Q
P752M;Q
End o# Cod!n.
U&er (n%er#a"e
6dm!n (n%er#a"e
End o# 5u%+u%
7$1Testing
Software testing is a critical element of software quality assurance and reresents the
ultimate re!iew of secification" design and code generation. #he increasing !isibility of
software as a system element and the attendant $costs% associated with a software
failure are moti!ating forces for well lanned through testing.
&nce source code has been generated" software must be tested to unco!er as many
errors as ossible before deli!ery to customer. #he goal is to design a series of test
cases that ha!e a high likelihood of finding errors but how' #hat( where software testing
techniques enter the ictures.
7$1$1 ,e&%!n. 5b)e"%!3e&
#esting is a rocess of e)ecuting a rogram with the intent of finding an error.
A good test case is one that has a high robability of finding an as*yet*
undisco!ered error.
A successful test is that unco!ers an as*yet* undisco!ered error.
7$1$2 ,e&%!n. Pr!n"!+-e
All tests should be traceable to customer requirement.
#ests should be lanned long before testing begins.
#he +areto rincile alies to software testing.
E)hausti!e testing is not ossible.
#o be most effecti!e" an indeendent third arty should conduct testing.
,Software testing in!ol!es e)ecuting an imlementation of the software with test data
and e)amining the oututs of the software and its oerational beha!ior to check that it is
erforming as required. #esting is a dynamic technique of !erification and !alidation
because it works with an e)ecutable reresentation of the system ,
7$1$9 Un!% ,e&%!n.
-nit testing focuses !erification effort on the smallest unit of software design*the software
comonent or module. -sing the comonent . le!el design descrition as a guide" imortant
control aths are tested to unco!er errors within the boundary of the module. #he relati!e
comle)ity of tests and unco!ered errors is limited by the constrained scoe established for
unit testing. #he unit test is white*bo) oriented and the ste can be conducted in arallel for
multile comonents.
Login Module:
Sr.
No
Test Case
Description
Input Expected
Bea!ior
"#ser!ed
#ea!ior
Test
$esult
/ Can 0D field be
1ull'
1ull 0D 0D cannot be
1-22
3arning msg ,0D
can4t be 1-22,
Success
2 Can assword
be 1ull'
1ull assword +assword
Can4t be
1-22
3arning msg
,assword
can4t be 1ull,
Success
5 2ogin button is
working or not'
Button
ressed
+erform login
rocessing
Call ro)y 0nbo)
frame
Success
4. 0s 2ogin 6rame
dislaying
roerly'
0n!oke
2ogin
6rame
All te)t fields are
dislayed and are
roerly aligned
2ittle alignment
roblem
Success
Ser!er side Login Module
Sr.
1o
#est Case
Descrition
0nut E)ected
Beha!ior
&bser!ed
beha!ior
#est
7esult
/ 0s Database
Connection
establishing'
Connection
ob8ect is
created
Connection
establishes
1o error during
connection was
found
Success
2 0s able to retrie!e
2ogin 0D and
assword from
database
2ogin 0D9
+ass*3ord
Able to
fetch data
from
Database
1o error found during
data fetching
Success
5 0s able to match 2ogin
0D : +assword
2ogin 0d
9+ass*word
+roer
matching
;atching done Success
Client% Ser!er Login Module com#ined Testing
Sr.
1o
#est Case
Descrition
0nut E)ected
Beha!ior
&bser!ed
beha!ior
#est
7esult
/ Client Ser!er
Connection
Connecti
on cmd
Connection
established
Connection is
established
Success
2 Ser!er
resonse
handled
roerly or
not'
2ogin cmd +roer
;essage
Dislayed to
-ser
All tye of
messages are
dislayed in
roer format to
user
Success
5 Communication
between client
and
ser!er
2ogin cmd 2ogin cmd is
recei!ed by
ser!er and
resonse is
send to client
Communication is
taking lace.
Success
4 3hat if -ser 0d
doesn4t e)ist
2ogin cmd9
-serlD
Ser!er should
reort non
e)istence of
-serlD
Error msg< ,2ogin
0D doesn4t e)ist,
Success
= 3hat if wrong
assword is
entered'
2ogin cmd9
-ser0D9
+assword
-ser should be
romt for
reentry of
assword
Error msg<
,0n!alid
+assword,
Success
&dd $ecord Module:
Sr.
1o
#est Case
Descrition
0nut E)ected
Beha!ior
&bser!ed
beha!ior
#est
7esult
/. 0s Database
Connection
establishing'
Connection
ob8ect is
created
Connection
establishes
1o error during
connection was
found
Success
2 Addition of Books. Book
1ame>Author>
Stock>Edition
Addition
Comleted.
Addition comleted Success
5 Addition of Books if
already e)its
Book
1ame>Author>
Stock>Edition
Addition
should not
comlete
Addition is not
comleted" because
record already
e)ists.
Success
Searc $ecord Module:
Sr.
No
Test Case
Description
Input Expected
Bea!ior
"#ser!ed
#ea!ior
Test
$esult
/. 0s Database
Connection
establishing'
Connection
ob8ect is created
Connection
establishes
1o error during
connection was
found
Success
2 &n search Criteria of
#itle>+ublisher>Editio
n should come in list
bo)
Book
1ame>Author>Sto
ck>Edition
7esult found. 7esult found. Success
'.(.) Integration Testing
0ntegration testing is a systematic technique for constructing the rogram structure while at the
same time conducting tests to unco!er errors associated with interfacing. #he ob8ecti!e is to
take unit tested comonents and build a rogram structure that has been dictated by design.
0ncremental integration is the antithesis of the big bang aroach. #he rogram is constructed
and tested in small increments" where errors are easier to isolate and correct" interfaces are
more likely to be tested comletely" and a systematic test aroach may be alied.
$egister Module* Login Module and Logout Module is Integrated
Sr
No
Test Case
Description
Input Expected
Bea!ior
"#ser!ed
#ea!ior
Test
$esult
/ 0s new -ser
created'
2ogin 0D
9ersonal
information
-ser should be created
and ersonal
information should be
stored in Database
-ser named
0D is created.
Success
2 0s Database
Connection
establishing'
Connection
ob8ect is
created
Connection
establishes
1o error
during
connection
was found
Success
5 0s able to match
2ogin 0D :
+assword
2ogin 0d
9+ass*
word
+roer matching ;atching done Success
4 Does status of
user changes to
42ogout status('
2ogout cmd Status should change. 1o change in
status
Success

&dd $ecord Module* Delete $ecord Module* +pdate $ecord Module* Searc
$ecord Module is Integrated
Sr
No
Test Case
Description
Input Expected
Bea!ior
"#ser!ed
#ea!ior
Test
$esult
/ 0s new 7ecord
Added in
database'
Book1ame>Au
thor
1ame>Edition
etc
7ecords should
be added and
dislayed on the
!iew age
7ecord is added
and dislayed on
the !iew age.
Success
2 0s e)isting
7ecord deleted
from database'
Book1ame>Au
thor
1ame>Edition
etc
7ecords should
be deleted and
should not be
dislayed on the
!iew age
7ecord is deleted
and not dislayed
on the !iew age.
Success
5 0s e)isting
7ecord udated
into database'
Book1ame>Au
thor
1ame>Edition
etc
7ecords should be
udated and
should be
dislayed on the
!iew age
7ecord is udated
and dislayed on
the !iew age.
Success
4 &n search
Criteria names
should be
correct.
Book1ame>Au
thor
1ame>Edition
etc
7ecords should
be dislayed on
the !iew age
7ecords found and
dislayed on the
!iew age.
Success
'.(.,S-stem Testing
System testing is actually a series of different tests whose rimary urose is to fully
e)ercise the comuter*based system. Although each test has a different urose" all
work to !erify that system elements ha!e been roerly integrated and erform allocated
functions.
.unctional $e/uirements
Sr.
No
Test Case
Description
Input Expected
Bea!ior
"#ser!ed #ea!ior Test $esult
/ Can 1ew -ser
7egister'
+ersonal 0nfo
of -ser
-ser should Be
registered on
D#0S ser!er
-ser is 7egistered
only 0f desired 0d does
1ot collide with
E)isting 0ds
Success
2 Can -ser 2ogin' 2oginld 9
assword
-ser should Be
login
-ser is login only
3hen 2ogin 0d :
assword is !alid
Success
5 Can -ser Add
7ecords
Book1ame>A
uthor
1ame>Edition
etc
-ser should be
able to Add
records
Added records will be
dislayed
Success
4. Can -ser Delete
7ecords
Book1ame>A
uthor
1ame>Edition
etc
-ser should be
able to delete
records
Deleted records will
not be dislayed
Success
= Can -ser -date
7ecords
Book1ame>A
uthor
1ame>Edition
etc
-ser should be
able to udate
records
-dated records will
be dislayed
Success
?. Can -ser Search
7ecords
Book1ame>A
uthor
1ame>Edition
etc.
-ser should be
able to search
records
7esult of search will
be dislayed.
Success
@. Can -ser 7ead
information
a!ailable on the
site.
Click the link -ser should be
able to 7ead
information
0nformation will be
dislayed.
Success
A Can -ser 2ogout Click &n
2ogout
-ser should
be able to
2ogout
2ogout ;essage Success
'.(.0 "1TIMI2&TI"N 1"INTS
#he software will work efficiently and seedily when the following conditions will be
satisfied<
#he ser!er should be of high configuration.
#he client machine has larger 7A;.
Adequate free sace on the client(s hard disk.
#he user waits until he gets the home age roerly.
1o access to the database for writing" deleting or udating by any other e)cet the
authority.
Salient .eatures of te S-stem
#he software is comletely menu dri!en.
#he data entry screens are comletely user friendly.
All editing features and na!igation from one field to another" one web age to
another" etc is ossible.
E)it from any web age is ossible.
Balidation checks ha!e been incororated in each web age at the aroriate
fields.
Database has been secured by means of assword rotection.
AuthoriCation is necessary for all the internal users of the site.
3. Limitations and .uture De!elopment
2here are some limitations for the current s&stem to which solutions can be pro%ided as a
future de%elopmentB
), 2he s&stem is not configured for multi( users at this time, 2he concept of
transaction can be used to achie%e this,
", 2he 6ebsite is not accessible to e%er&one, It can be deplo&ed on a web ser%er so
that e%er&bod& who is connected to the Internet can use it,
-, Credit Card %alidation is not done, 2hird part& proprietar& software can be used
for %alidation chec4,
6& #or o%her #u%ure de3e-o+men%&C %he #o--o7!n. "an be doneB
), 2he Administrator of the web site can be gi%en more functionalities, li4e
loo4ing at a specific customerAs profile, the boo4s that ha%e to be reordered,
etc,
", Multiple Shopping carts can be allowed,
8$1$ Con"-u&!on
2he Internet has become a ma3or resource in modern business, thus electronic shopping
has gained significance not onl& from the entrepreneurAs but also from the customerAs
point of %iew, @or the entrepreneur, electronic shopping generates new business
opportunities and for the customer, it ma4es comparati%e shopping possible, As per a
sur%e&, most consumers of online stores are impulsi%e and usuall& ma4e a decision to
sta& on a site within the first few seconds, L6ebsite design is li4e a shop interior, If the
shop loo4s poor or li4e hundreds of other shops the customer is most li4el& to s4ip to the
other site, 5ence we ha%e designed the pro3ect to pro%ide the user with eas& na%igation,
retrie%al of data and necessar& feedbac4 as much as possible,
In this pro3ect, the user is pro%ided with an e(commerce web site that can be used
to bu& boo4s online, 2o implement this as a web application we used 9S8 as the
2echnolog&, 9S8 has se%eral ad%antages such as enhanced performance, scalabilit&, built(
in securit& and simplicit&, 2o build an& web application using 9S8 we need a
8rogramming language such as 9a%a and 9S8 so on, was the language used to build this
application, @or the client browser to connect to the 9S8 engine we used 2omcat web
ser%er,
9S8 uses 9'<C to interact with the database as it pro%ides in(memor& caching that
eliminates the need to contact the database ser%er frequentl& and it can easil& deplo&
and maintain an 9S8 application, Oracle was used as bac4(end database since it is one of
the most popular commercial databases, and it pro%ides fast data access, eas& installation
and simplicit&,
A good shopping cart design must be accompanied with user(friendl& shopping cart
application logic, It should be con%enient for the customer to %iew the contents of their
cart and to be able to remo%e or add items to their cart, 2he shopping cart application
described in this pro3ect pro%ides a number of features that are designed to ma4e the
customer more comfortable,
2his pro3ect helps in understanding the creation of an interacti%e web page and
the technologies used to implement it, 2he design of the pro3ect which includes 'ata
Model and 8rocess Model illustrates how the database is built with different tables, how
the data is accessed and processed from the tables, 2he building of the pro3ect has gi%en
me a precise 4nowledge about how 9S8 is used to de%elop a website, how it connects to
the database to access the data and how the data and web pages are modified to pro%ide
the user with a shopping cart application,
4
&i2liograph#

?1 Re%erences
?.1.1 &oo-s @ (uthors
Naughton Schildt, Complete =eference 9a%a ", 2hird 1dition, 2MG,
I%or 5orton, <eginning 9a%a ", 6ro: 8ublications,
8rofessional 9a%a Ser%er 8rogramming 9"11 ),- 1dition, A8ress,
Oracle $iB 2he Complete =eference, He%in ;one& \ George Hoch,
Oracle 8ress,
Software 1ngineering, 8ressman,
?.1.2 "onsulted <e2sites
www,google,com
www,wro:,com
www,3a%a,sun,com
www,oracle,com
EN*

You might also like