Você está na página 1de 75

KAMLA NEHRU INSTITUTE OF TECHNOLOGY SULTANPUR

PROJECT REPORT ON

Submitted in the partial fulfilment for award of degree of Bachelor of Technology (Computer Science and Engineering) Submitted by:

Mr. Abhay Kumar Agarwal (Project Guide)

Dr. A.K.Malviya (Project In-Charge)

Mr. Sameer Srivastava (Head of Dept.)

ACKNOWL DG M NT

coul have been a better plat orm than this for me to express

my deep routed feelings for those who patronized the cause of our Project On ONLIN MU IC WORLD and paved our way to comprehend the facts in a better perspective. In consummation of any task is not only the reward to the person actively involved in the accompl ishing but also to those who inspire and guide. We are highly indebted to Mr. Sameer Srivastava, Professor and Head of Department of Computer Science & Engineering for his invaluable support. We would like to give our heartfel t thanks to Mr. Abhay Kumar Agarwal, Project Guide and Dr. A.K.Malviya, Project In-Charge, who very sincerely extended their help and provided resourceful inputs without which the work would never have been realized. The rigorous task of documentation is the outcome of skilled guidance and fruitful suggestions of mentioned above. the myriad of the persons

SYNOPSIS

INTRODUCTION: Online Transaction are playing an important role in the present world of computers. People are busy with their challenging professions . Time has become so precious that Quotation TIME IS MONEY is really playing an important role in every walk-of-life. things which are done manually takes a lot of time to complete a task . Shopping has long been considered a recreational activity by many. The goal of this application are:  To develop a web based interface for online retailers. The system would be easy to use and hence make the shopping experience pleasant for the customers.  The application will enable the visitor to register to Online music world by just giving few simple details and select a login id and password to access the online music world.  To develop an easy to use web based interface where users can search for products, view a description of the products and order the products.  The search engine would list a set of products based on the name of the product, name of the director, cast, year in which it is released and user can further filter the details and select a list of items.  Drag and Drop feature which would allow the users to add a product to cart and remove a product from the shopping cart by dragging the product in to the shopping cart or out of the shopping cart.  The user can come out of the Online Music World by logging out.

 The application will have a administrator page which will perform several activities like creating stock for the products giving its details, delete a user, check the orders given by registered user, check the financial status of user and deliver the order given by user.

The Project Life Cycle

The development life cycle of a project usually involves two stages:  Project initiation  Project execution In the project initiation stage, the development team prepares the project plans and finalizes the outcome of each phase. In this stage, the team also prepares a comprehensive list of tasks involved in each phase, and the project manager assigns responsibilities to the team members, depending on their skills. In the project execution stage, the team develops the product. In the case of the music application development team, they will develop the online music application.

The Requirements Analysis Phase:


During the requirements analysis phase, the development team analyzes the requirements to be fulfilled by the online music application and identifies the probable approach for meeting these requirements. To identify the requirements needed of the application, the team decides to study the existing music portals and conduct extensive interviews among Music Worlds customers and managers. During interviews it is noticed that instead of viewing a comprehensive list of song items available, the customers would prefer to look for the song items in the specific song category and then place the order. Finally, the team identifies that the music application should:

 Enable a visitor to register with the application after validation has been performed on the data provided by the user  Enable visitors to perform activities such as search for song items based on name of the song, cast, director and year in which it is released.  Enable a registered user to select items for purchase.  Enable registered users to select song items and place them in a shopping cart and can also remove the items from the shopping cart.  Enable administrators to maintain user details and manage music items in the inventory.

The High-Level Design Phase:


In this phase, the team decides how the application should function. The formats for data input and output is finalized here. The functional specifications documentation of the application is presented in a language that can be understood by all. The finished project design is, however, executed only on the project managers approval. The development team identifies three categories in which the interfaces of the music application will be divided. These categories are: User Interface  Administrator Interface The User Interface category will have the following pages:  The User Home Page  Search Page  The Shopping Cart Page  The Buy Page  The Logout Page The Administrator Interface category will have the following pages:  The Delete User Page  The Add Item Page  The Modify Item Page  The Reports Page, which includes sales reports for all the users.

SYSTEM REQUIREMENTS
TOOLS USED: Net Beans 6.5 My SQL Apache Tomcat Server(6.0.18)

CONCEPTS:

Java Server Pages (JSP) JDBC HTML Cascaded Style Sheet (CSS) Struts Java J2EE

HARDWARE:  The screen resolution of the client must be a minimum of 800x600 for
proper viewing of site.

 There has to be a support of a printer so that the reports can be


printed.

 Processor must be a minimum of Pentium-II 500 GHZ.

PROBLEM DEFINITION
The basic problems with the existing systems are: The non-interactive environment these systems provide to the users.  The use of traditional user interfaces which make continuous post backs to the Server each post back makes a call to the server, gets the response and then refreshes the entire web form to display the result. This scenario adds an extra trade off causing a delay in displaying the results  A search engine that would display the results without allowing the users to further filter the results based on various parameters.  Use of traditional and non user friendly interfaces that are hard to use.

SOLUTION TO THE EXISTING PROBLEM


The motive of this Online Shopping Web Application is  To allow the user to play with the search tool and create different combinatorial search criterion to perform exhaustive search.  Provide Interactive interface through which a user can interact with different areas of application easily.  The search engine would list a set of products based on the search term and the user can further filter the list based on various parameters.  Provide Drag and Drop feature thereby allowing the user to add products to or remove products from the shopping cart by dragging the products in to or out of the shopping cart.

SOFTWARE REQUIREMENT ANALYSIS


1. INTRODUCTION

a. Purpose: The purpose of this project is to develop a online music store where a user can search songs based on various criteria and can order the item. The people are very busy in their life schedule so this system provides easy access for buying of CD, DVD.

b. Scope:  The product is named as Online Music World .  A portal to buy music CD, DVD.  The user can register on online music store if he/she is not is
not yet registered on it.

 The registered user will get a login id and password to access the online music world.  The user can search a song based on various criteria and add it to a cart.  The user can remove the selected items from the cart.  The user can finally order the items c. Definitions Acronym and Abbreviations:

SRS: Software Requirement Specification. This is the way to


Represent Requirements in a consistent format.

d. References: IEEE SRS format

e. Technologies Used: HTML Java Server Pages J2EE CSS Java Struts

f. Tools Used:

Net Beans 6.5 My SQL Database Server

g. Overview: The SRS consist of two sections namely overall description and specific Requirements.  Overall description: This

will be

describing system

components and interconnections.  Specific Requirements: This will describe roles and functions of actors.

2. OVERALL DESCRIPTION:
This application is going to give an online platform to the users to buy music products. Only authorized users can login access the online music world. into the portal and

a. Product Perspective: The application will be developed on the windows vista platform using the specified technologies.

i.

User Interface: The application will be having a very


user friendly interface so that user can easily navigate throughout the site easily.

ii. Hardware Interface: The screen resolution of the client system


minimum of 800x600 for proper viewing.

Processor must be a minimum of Pentium-II 500 GHz .

iii. Software Interfaces: Server Side: Windows Vista My SQL Database Server  Client Side:  Operating system (Windows Vista)  Java enabled web browser. iv. Communication Interface: HTTP is used. v. Memory Constraint:  At least 5 GB free space on the hard disk. RAM must be a minimum of 2 GB.

vi. Operations: The operations are divided in fields like admin, user.

b. Product Functions: User registration: The user will be registered . Login : The user can login to the site for viewing the details.

Searching the item : The user can search the songs.

Add to Cart: The user can search the items & add to cart.

Remove from Cart: The user can remove the items from cart.

Place the order: The user can finally order the items .

Logout: The user can logout of his/her account .

c. User characteristics: The user interface is very friendly & informs


Users of any of the

i) The users that are going to use this application are as follows: Tech savvy people, those who are interested in
Accomplishing their work online to save time

 People who find it difficult to travel a distance to


the store & stand in a queue for a long time just for the sake of a 2 minute work.

ii) The expectations form the user who uses the application are:

The user must have basic knowledge of how to handle &


navigate within a website.

The user must have a basic knowledge of English.

3. SPECIFIC REQUIREMENTS:

a. Functions:

 Enable a visitor to register with the application after validation has been performed on the data provided by the user  Enable visitors to perform activities such as search for song items based on name of the song, cast, director and year in which it is released.  Enable a registered user to select items for purchase.  Enable registered users to select song items and place them in a shopping cart and can also remove the items from the shopping cart.  Enable administrators to maintain user details and manage music items in the inventory.

b. Logical Database Requirements:


In this project there are two interfaces used, administrator and the user. The information used by user are:  Search criteria(name, cast, year, director)  Login id and password The information used by administrator are:  Stock details(stock id, name, disk type, content, director, year, quantity, price per unit)  Login id of user(to delete a user)  Order details(order id, login id, stock id ,quantity, status, price, name)

c. Data Entities and their relationship:

E R DIAGRAM FOR USER

Name Cart Add to cart List

Year Price

Visitor
By Year

Contains

By Name

Register

By Cast Search

Search For items Register User By Director

Confirm Password Name


User id

Login id

Basic

Password Last Name Middle Name First Name

Occupation

E R DIAGRAM FOR ADMINISTRATOR

Administrator

Delete a stock id

User account details

Balance Login id Create Stock

Finance

Name Stock

Quantity

Manage user account (deletion of a user)

Disk Type Stock id Cast year Director Role

Login id

User

Password

Status

Content

Price

DISADVANTAGES OF CURRENT SYSTEM


The basic problems with the existing systems are: The non-interactive environment these systems provide to the users.  The use of traditional user interfaces which make continuous post backs to the server; each post back makes a call to the server, gets the response and then refreshes the entire web form to display the result. This scenario adds an extra trade off causing a delay in displaying the results.  A search engine that would display the results without allowing the users to further filter the results based on various parameters.  Use of traditional and non user friendly interfaces that are hard to use.

ADVANTAGES OF PROPOSED SYSTEM

The Motive of this Online Shopping Web Application are:  To allow the user to play with the search tool and create different combinatorial search criterion to perform exhaustive search.  Provide Interactive interface through which a user can interact with different areas of application easily.  The search engine would list a set of products based on the search term and the user can further filter the list based on various parameters.  Provide Drag and Drop feature thereby allowing the user to add products to or remove products from the shopping cart by dragging the products in to or out of the shopping cart.

FEASIBILITY STUDY REPORT

System Feasibility:
The system feasibility can be divided into the following sections:

Economic Feasibility
The project is economically feasible as the only cost involved is having a Computer with the minimum requirements mentioned earlier. For the users to access the application, the only cost involved will be in getting access to the Internet.

Technical Feasibility
To deploy the application, the only technical aspects needed are mentioned below: Operating Environment : Windows Vista Platform : Net Beans 6.5 Database : My SQL

For Users:
Internet Browser Internet Connection

Behavioural Feasibility
The application requires no special technical guidance and all the views available In the application are self explanatory. The users are well guided with warning and failure messages for all the actions taken.

DEVELOPMENT SCHEDULE
The analysis of the project is done based on user requirements. The synopsis of this Project is prepared by us in the 7th semester and approved by our project guide.

ACTIVITIES Review Analysis Design Coding Testing Documentation of

JAN  

FEB

MAR

APR

MAY

       

SYSTEM REQUIREMENTS
TOOLS USED: Net Beans 6.5 My SQL Apache Tomcat Server(6.0.18)

CONCEPTS:

Java Server Pages (JSP) JDBC HTML Cascaded Style Sheet (CSS) Struts Java J2EE

HARDWARE:  The screen resolution of the client must be a minimum of 800x600 for
proper viewing of site.

 There has to be a support of a printer so that the reports can be


printed.

 Processor must be a minimum of Pentium-II 500 GHZ .

USE CASE DIAGRAM FOR ADMINISTRATOR

Delete any Add New Stock Stock

Update a Stock

Administrator

Manage Catalog

Check financial status of user Check Orders

Manage User Account

USE CASE DIAGRAM FOR USER

Browse Catalog

Perform product search

Register

Manage Account

Login

Logout

Place order

Add to shopping Cart

View cart details

Final order of products

Cancel Order

DATA DICTIONARY The fields of table login master:

Fi l Name

Size

Descri i

Login Id Password Role Status

Varchar Varchar Varchar Varchar

45 45 45 45

Id of user/admin Password Role(user/admin) Active/deactivate

The fields of table member detail:

Fiel Name

Size

Descri i

Login id F name M name L name Basic E mail Dob Street City Pin code State Country Job/occupation

Varchar Varchar Varchar Varchar Integer Varchar Varchar Varchar Varchar Integer Varchar Varchar Varchar

45 45 45 45 20 45 45 45 45 20 45 45 45

Id of user First name Middle name Last name Basic phone no. Email address Date of birth Street name City name Pincode of city State name Country name Job of user

The fields of table user account details:

Fiel s

Size

Descri i

Login id Balance

Varchar Integer

45 20

Id of user Account balance of user

The fields of table stock master:

Fiel s

Size

Descri i

Stock Id

Integer

20

Unique Id of music item

Name Disk type

Varchar Varchar

45 45

Name of song Type disk(CD,DVD) of

Content Cast Director Year Quantity

Varchar Varchar Varchar Integer Integer

45 45 45 20 20

Content(video,mp3) Actor/actress Director name Year of release No. item of available

Price per unit

Integer

20

Price of item

The fields of table order master:

Fiel s

Size

Descri i

Order id

Integer

20

Unique order

id

of

Login id Stock id

Varchar Varchar

45 45

Id of user Unique id music item

Quantity

Integer

20

No. of ordered items

Status Price Name

Varchar Integer Varchar

45 20 45

Pending/delivered Total price Name of song

FLOWCHART

Start

Welcome screen

Is a customer or a Administrator

Administrartor C2

Customer

Registered user Is a new user or a Registered User New user C1

Registration form

Submit

User has been registered

C1

Se c by c s , ye , direc r ,price
Se rc by c s , ye r, direc r ,price

Display the name, year, price

If user wants to purc ase

Add to cart

Display the details.

C2

Stock Form

Enter the details and added in to it

If operation is add

Stock id data deleted

If deletio n

Given id data update

Stock has been added

If option deletio n

Stock id data deleted

end

DATA FLOW DIAGRAM Level 0:

Administrator

Sales

stock information

Online Music World Personal details Purchase order Stock details Customer registered Visitor

Level 1:

Search the item

Stock file

Customer

Add to cart

Order file

Remove from cart

Stock file

Add stock Delete a stock

Administrator Update a stock Check orders

order file Manage user account

User detail

SCREENSHOTS

Main Form:

Registration form

Home Page of User:

Search List Page:

Cart Page:

Order Page:

ADMIN ACCOUNT

The above picture is the home page of administrator. We have given four options namely: stock, finance, check order and manage user account. An option for logout is also given which will redirect it to the login page.

When the admin click on the option stock, this page will be displayed. Here we have given all the stock information. An options for add , delete and update the options of stock is given. User can enter the desired field of the new stock. For delete option, stock id should be entered, and for update, we have to click on the link.

After the stock id for deletion is entered, the respective stock is deleted.

After clicking on the link for update, this page will be displayed. We have to enter the stock id, the respective field to be updated and the new value.

After clicking on submit button on previous page, this page will be displayed where the new stock table is displayed after update.

On clicking to FINANCE option on admin home page, this page will be redirected. This displays the user account details consisting of login id and balance.

On clicking to the link CHECK ORDERS, all the information related to placed orders will be displayed.

On clicking to the SERVICE ORDERS link, the user having pending status request will be set delivered.

On clicking to the MANAGE USER ACCOUNT, this page will be displayed which consists of user information table. The admin can also delete the user if he wants also the orders can also be serviced.

CODING
ADMIN.JSP

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-a: { color="#330066" } .style1 { font-family: "Verdana"; font-size: 36px; color: #000000; } style4 {font-family: "COMIc Sans MS"; font-size: 16px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "GEORGIA"; font-size: 18px; } .style10 { font-family: "Times New Roman"; font-size: 24px; } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;}

--> </style> </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> <tr> <td height="141" colspan="3" bgcolor="#9933cc"> <marquee direction="right" behavior="alternate" bgcolor="black"> <img src="jashnn.jpg" width="153" height="153" /> <img src="letsdance.jpg" width="153" height="153" /> <img src="newyork.jpg" width="154" height="156" /> <img src="payingguests.jpg" width="149" height="151" /> <img src="runway.jpg" width="149" height="151" /> <img src="kambakkhtishq.jpg" width="150" height="149" /> <img src="shortkut.jpg" width="149" height="148" /></marquee> </tr> </table> <font size="6" color="pink" face="Comic Sans ms "><center>Welcome Administrator</center></font> <center> <table width="270" cellpadding="10" cellspacing="2" border="1" > <tr> <td> <center> <a href="Stock.jsp"><font class="style9" color="#330066">STOCK</font></a> </center>

</td> </tr> <tr> <td> <center> <a href="Finance.jsp"><font class="style9" color="#330066">FINANCE</font></a> </center> </td> </tr> <tr> <td> <center> <a href="CheckOrders.jsp"><font class="style9" color="#330066">CHECK ORDER</font></a> </center> </td> </tr> <tr> <td> <center> <a href="ManageUser.jsp"><font class="style9" color="#330066">MANAGE USER ACCOUNT</font></a> </center> </td> </tr> </table> </center> </body> </html>

ADDSTOCK..JSP

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/> <title>Untitled Document</title> <style type="text/css"> <!-.style1 { font-family: "Verdana"; font-size: 36px; color: #000000; } .style4 { font-family: "COMIc Sans MS"; font-size: 18px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "georgia"; font-size: 16px; } .style10 { font-family: "Georgia"; font-size: 24px; } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;} --> </style> </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr>

<td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> </table> <br><br> <sql:setDataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/oes" user="root" password="strange"/> <sql:update var="rs" sql="insert into stock_master values(?,?,?,?,?,?,?,?,?)" > <sql:param value="${param.stock_id}"/> <sql:param value="${param.name}"/> <sql:param value="${param.disk_type}"/> <sql:param value="${param.content}"/> <sql:param value="${param.cast}"/> <sql:param value="${param.director}"/> <sql:param value="${param.year}"/> <sql:param value="${param.quantity}"/> <sql:param value="${param.price_per_unit}"/> </sql:update> <jsp:forward page="Stock.jsp"/> </body> </html>

DELETESTOCK..JSP

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="core" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/>

<title>Untitled Document</title> <style type="text/css"> <!-.style1 { font-family: "Verdana"; font-size: 36px; color: #000000; } .style4 {font-family: "COMIc Sans MS"; font-size: 16px; } .style7 {font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "GEORGIA"; font-size: 18px; } .style10 { font-family: "Times New Roman"; font-size: 24px; } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;} --> </style> </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> </table>

<br><br> <sql:setDataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/oes" user="root" password="strange"/> <sql:update var="rs" sql="delete from stock_master where stock_id=?;" > <sql:param value="${param.stock_id}"/>\ </sql:update> <font size=4 color=black>The new Stock is after deletion</font> <sql:query var="rs" sql="select *from stock_master"/> <core:catch var="error"> <form> <center><table border="2" cellspacing="3" cellpadding="3"> <tr><th>STOCK ID</th><th>NAME</th><th>DISK TYPE</th><TH>CONTENT</TH><TH>CAST</TH><TH>DIRECTOR</TH><TH>YEAR</TH>< TH>QUANTITY</TH><TH>PRICE PER UNIT</TH></TR <core:forEach var="r" items="${rs.rows}" > <tr><td>${r.stock_id}</td><td>${r.name}</td><td>${r.disk_type}</td><td>${r.content}</td><td>$ {r.cast}</td><td>${r.director}</td><td>${r.year}</td><td>${r.quantity}</td><td>${r.price_per_unit }</td></tr> </core:forEach> <core:out value="${error}"/> </core:catch> </table> </center></form> </body> </html>

UPADATESTOCK.JSP <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="core" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/> <title>Untitled Document</title>

<style type="text/css"> <!-.style1 { font-family: "Verdana"; font-size: 36px; color: #000000; } .style4 {font-family: "COMIc Sans MS"; font-size: 16px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "GEORGIA"; font-size: 18px; } .style10 { font-family: "Times New Roman"; font-size: 24px; } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;}

-->
</style> </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> </table> <br><br>

<form action="UpdateStock2.jsp"><br> <font size="5" color="blue">Enter the Stock id to be updated<br> <input type="text" name="stock_id"> <br>Enter the field to be updated</font><br> <input type="radio" name="c" value="stock_id"/>STOCK ID<br> <input type="radio" name="c" value="name"/>NAME<br> <input type="radio" name="c" value="disk_type"/>DISK TYPE<br> <input type="radio" name="c" value="content"/>CONTENT<br> <input type="radio" name="c" value="cast"/>CAST<br> <input type="radio" name="c" value="director"/>DIRECTOR<br> <input type="radio" name="c" value="year"/>YEAR<br> <input type="radio" name="c" value="quantity"/>QUANTITY<br> <input type="radio" name="c" value="price_per_unit"/>PRICE PER UNIT<br> <br><font size="5" color="blue">Enter the new value to be submitted</font><br> <input type="text" name="newvalue"/> <input type="submit" value="enter"/> </form> </body> </html>

CHECKORDER.JSP

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"prefix="core" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="h"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/> <title>Untitled Document</title> <style type="text/css">

<!-.style1 { font-family: "Verdana"; font-size: 36px; color: #000000; } .style4 { font-family: "COMIc Sans MS"; font-size: 18px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "georgia"; font-size: 16px;} .style10 { font-family: "Georgia"; font-size: 24px; } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;} --> </style> </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> </table> <BR>

<sql:setDataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/oes" user="root" password="strange"/> <sql:query var="rs" sql="select *from order_master"/> <center> <H1>PLACED ORDERS</H1> <table border="2" cellspacing="3" cellpadding="3">

<tr><th>LOGIN_ID</th><th>STOCK_ID</th><TH>QUANTITY</TH><TH>STATUS</TH><TH >PRICE</TH><TH>NAME</TH></TR> <core:forEach var="r" items="${rs.rows}" > <tr><td>${r.login_id}</td><td>${r.stock_id}</td><td>${r.quantity}</td><td>${r.status}</td><td>$ {r.price}</td><td>${r.name}</td></tr> </table><BR><BR><BR> <a href="ServiceOrders.jsp"><FONT SIZE="4" COLOR="BLACK">SERVICE ORDERS</font></a> </center> </BODY> </html>

FINANACE.JSP <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"prefix="core" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="h"%>

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/> <title>Untitled Document</title> <style type="text/css"> <!-.style1 { font-family: "Verdana";

font-size: 36px; color: #000000; } .style4 { font-family: "COMIc Sans MS"; font-size: 18px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "georgia"; font-size: 16px; } .style10 { font-family: "Georgia"; font-size: 24px; } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;} --> </style> </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> </table> <BR><BR><BR>

<sql:setDataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/oes" user="root" password="strange"/>

<sql:query var="rs" sql="select * from user_acc_detail"/> <core:catch var="error"> <center><h1>USER ACCOUNT DETAILS</h1> <table border="2" cellspacing="3" cellpadding="3"> <tr><th>LOGIN_ID</th><th>BALANCE</th></TR> <core:forEach var="r" items="${rs.rows}" > <tr><td>${r.login_id}</td><td>${r.balance}</td></tr> <core:if test="${r.balance eq \"0\"}"> <sql:update var="r2" sql="update login_master set status='deactive' where login_id='${r.login_id} ' " ><font color="blue">${r.login_id}'s status changed </sql:update> </core:if> </core:forEach> <core:out value="${error}"/> </table> <br><font size="5" color="black">USERS STATUS SET DEACTIVE OF ZERO BALANCE</font> </center> </body> </html>

MANAGEUSERACCOUNT.JSP <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"prefix="core" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="h"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/> <title>Untitled Document</title> <style type="text/css"> <!--

.style1 { font-family: "Verdana"; font-size: 36px; color: #000000; } .style4 { font-family: "COMIc Sans MS"; font-size: 18px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "georgia"; font-size: 16px; } .style10 { font-family: "Georgia"; font-size: 24px; } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;} </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> </table> <BR> <sql:setDataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/oes" user="root" password="strange"/> <sql:query var="rs" sql="select *from order_master"/>

<center> <H1>ORDER INFORMATION</H1> <table border="2" cellspacing="5">

<tr><th>ORDER_ID</th><th>LOGIN_ID</th><th>STOCK_ID</th><th>QUANTITY</th><th>ST ATUS</th><th>NAME</th><th>PRICE</th></TR> <core:forEach var="r" items="${rs.rows}" >

<tr><td>${r.order_id}</td><td>${r.login_id}</td><td>${r.stock_id}</td><td>${r.quantity}</td><td >${r.status}</td><td>${r.name}</td><td>${r.price}</td></tr> </core:forEach></table> <form action="DelUser.jsp"> <br><font size="5" color="blue">enter the login id to be deleted<br></font> <input type="text" name="login_id"/> <input type="submit" value="delete"/> </FORM> <BR><BR><BR> <a href="ServiceOrders.jsp"><FONT SIZE="4" COLOR="#330066">SERVICE ORDERS</font></a> </center> </BODY> </html>

DELETEUSER.JSP

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="core" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/> <title>Untitled Document</title>

<style type="text/css"> <!-.style1 { font-family: "Verdana"; font-size: 36px; color: #000000; } .style4 { font-family: "COMIc Sans MS"; font-size: 18px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "georgia"; font-size: 16px; } .style10 { font-family: "Georgia"; font-size: 24px; } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;} --> </style> </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> </table>

<br><br> <sql:setDataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/oes" user="root" password="strange"/> <sql:update var="rs" sql="delete from login_master where login_id=?;" > <sql:param value="${param.login_id}"/> <sql:update var="rs" sql="delete from order_master where login_id=?;" > <sql:param value="${param.login_id}"/> <sql:update var="rs" sql="delete from member_detail where login_id=?;" > <sql:param value="${param.login_id}"/> <sql:update var="rs" sql="delete from user_acc_detail where login_id=?;" > <sql:param value="${param.login_id}"/> </sql:update> </sql:update> </sql:update> </sql:update> <font size=4 color="black">The user is deleted.</font> <sql:query var="rs" sql="select *from login_master"/> <core:catch var="error"> <form> <center><table border="2" cellspacing="3">

<tr><th>LOGIN_ID</th><th>PASSWORD</th><th>ROLE</th><TH>STATUS</TH></TR> <core:forEach var="r" items="${rs.rows}" >

<tr><td>${r.login_id}</td><td>${r.password}</td><td>${r.role}</td><td>${r.status}</td></tr> </core:forEach> <core:out value="${error}"/> </core:catch> </table> </center></form> </html>

LOGINPAGE.JSP <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="h" %> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/> <title>Untitled Document</title> <style type="text/css"> <!-.style1 { font-family: "Verdana"; font-size: 36px; color: #000000; } .style4 {font-family: "COMIc Sans MS"; font-size: 16px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "GEORGIA"; font-size: 18px; } .style10 { font-family: "Times New Roman"; font-size: 24px;} .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;} --> </style> </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p>

<p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> <tr> <td height="141" colspan="3" bgcolor="#9933cc"> <marquee direction="right" behavior="alternate" bgcolor="black"> <img src="jashnn.jpg" width="153" height="153" /> <img src="letsdance.jpg" width="153" height="153" /> <img src="newyork.jpg" width="154" height="156" /> <img src="payingguests.jpg" width="149" height="151" /> <img src="runway.jpg" width="149" height="151" /> <img src="kambakkhtishq.jpg" width="150" height="149" /> <img src="shortkut.jpg" width="149" height="148" /> </marquee> </td> </tr> </table> <br><br> <center> <table cellpadding="2" border="1"> <tr> <td width="150" height="35" bgcolor="#9933cc"><div align="center" class="style4">LOGIN</div></td> <td width="150" bgcolor="#9933cc"><input type="text" name="textfield" /></td> </tr> <tr> <td bgcolor="#9933cc"><div align="center" class="style4">PASSWORD</div></td> <td height="35" bgcolor="#9933cc"><input type="text" name="textfield2" /></td> </tr> <tr> <td height="35" colspan="2" bgcolor="#9933cc">

<div align="center"> <input name="Submit" type="submit" class="style4" id="Submit" value="Submit" /> </div></td> </tr> <tr> <td height="35" colspan="2" bgcolor="#9933cc" class="style4"><div align="center"><u>NOT A USER YET? </u></div></td> </tr> <tr> <td height="35" colspan="2" bgcolor="#9933cc"><label for="label"></label> <div align="center"> <a href="Registeration.jsp"><font class="style4" color="#990066">Click Here To Register</a> </div></td> </tr> </table> </center>

REGISTRATION.JSP

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="h" %> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/> <title>Untitled Document</title> <style type="text/css"> <!-.style1 { font-family: "Verdana"; font-size: 36px; color: #000000; }

.style4 { font-family: "COMIc Sans MS"; font-size: 18px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "georgia"; font-size: 16px; } } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;} --> </style> </head>

<body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" .style10 { font-family: "Georgia"; font-size: 24px;background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> </table> <center> <font class="style10" color="#330066"> REGISTERATION FORM<br> </font> <center> <a href= welcomeStruts.jsp><font class="style4" color="blue">Click here to login</font></a

<br> <font class="style9" color="blue">${requestScope.q} <br> </font> </center> <font class="style4" color="#330066">Hello ......... <br>Just answer a few simple question, select an id and a password and you will get registered on online music world. <br> <br> </font> </center> <center> <table> <h:form action="/Register"> <tr><td><font class="style9"color="#330066">*First Name:</font></td><td> <h:text property="fname"/><h:errors property="fname"/></td></tr> <tr><td><font class="style9"color="#330066">&nbsp;&nbsp;Middle name:</font> </td><td><h:text property="mname"/></td></tr> <tr><td><font class="style9"color="#330066">*Last Name: </font></td><td><h:text property="lname"/><h:errors property="lname"/></td></tr> <tr><td><font class="style9"color="#330066">*Login ID: </font></td><td><h:text property="id"/><h:errors property="id"/></td></tr> <tr><td><font class="style9"color="#330066">&nbsp;&nbsp;Basic:</font> </td><td><h:text property="basic"/></td></tr> <tr><td><font class="style9"color="#330066">*Occupation: </font></td><td><h:text property="occupation"/><h:errors property="occupation"/></td></tr> <tr><td><font class="style9"color="#330066">*Email: </font></td><td><h:text property="email"/><font color="#330066"> "abc@oew.com"</font>^<h:errors property="email"/></td></tr>

<tr><td><font class="style9"color="#330066">*Password: </font></td><td><h:password property="password"/></td></tr> <tr><td><font class="style9"color="#330066">*Confirm Password:</font> </td><td><h:password property="confirm"/><h:errors property="same"/></td></tr>

<tr><td><font class="style9"color="#330066">*Date Of Birth: </font></td><td><h:text property="dob" /> <font color="#330066">"dd-mm-yy"</font></td></tr> <tr><td><font class="style9"color="#330066">*Street: </font></td><td><h:text property="street"/><h:errors property="street"/></td></tr> <tr><td><font class="style9"color="#330066">*City: </font></td><td><h:text property="city"/><h:errors property="city"/></td></tr> <tr><td><font class="style9"color="#330066">*State: </font></td><td><h:text property="state"/><h:errors property="state"/></td></tr> <tr><td><font class="style9"color="#330066">&nbsp;&nbsp;Pincode: </font></td><td><h:text property="pincode"/></td></tr> <tr><td><font class="style9"color="#330066">*Country: </font></td><td><h:text property="country"/><h:errors property="country"/></td></tr> </table> <font class="style9" color="#330066">The Fields with * are necessary to be filled</font> <br> <h:submit /> </center> </h:form>

CART.JSP <%@ page import="java.sql.*,utility.*" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="h" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="s" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <h:html locale="true"> <head> <meta http-equiv="Content-Type" content="text/html; charset= utf-8"/> <title>Untitled Document</title> <style type="text/css"> <!-.style1 {

font-family: "Verdana"; font-size: 36px; color: black; } .style4 {font-family: "COMIc Sans MS"; font-size: 16px; } .style7 {font-family: Geneva, Arial, Helvetica, sans -serif; font-weight: bold; font-size: 24px;} .style9 { font-family: "GEORGIA"; font-size: 18px;} .style10 { font-family: "Times New Roman"; font-size: 24px; } .style13 {font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif;} --> </style> </head> <body bgcolor="#9933cc" cellpadding="0" cellspacing="0"> <table width="100%"> <tr> <td height="150" background="header.jpg"><p align="center" class="style1">WELCOME TO </p> <p align="center" class="style1"><marquee behavior="alternate">ONLINE MUSIC WORLD......</marquee></p></td> </tr> <tr> <td height="141" colspan="3" bgcolor="#9933cc"> <marquee direction="right" behavior="alternate" bgcolor="black"> <img src="jashnn.jpg" width="153" height="153" /> <img src="letsdance.jpg" width="153" height="153" /> <img src="newyork.jpg" width="154" height="156" />

<img src="payingguests.jpg" width="149" height="151" /> <img src="runway.jpg" width="149" height="151" /> <img src="kambakkhtishq.jpg" width="150" height="149" /> <img src="shortkut.jpg" width="149" height="148" /></marquee> <!--<img src="../Desktop/runway.jpg" width="149" height="151"/></td>--> </tr> </table> <font size="6" color="pink" face="Comic Sans ms "><center>${sessionScope.loginid}'s Cart Contains</center></font> <center> <table cellpadding="20"> <center> <tr> <td><h:link action="/signout"> <font class="style9" color="blue">Logout</font> </h:link></td> <td><h:link action="/order"> <font class="style9" color="blue">Place Order</font> </h:link></td> <td><h:link action="/cancel"> <font class="style9" color="blue">Cancel Order </font> </h:link></td> </tr> </center> </table> </center> <br> <% int count=0; int bal=0;

int quant=0; int j=0; String id=(String)session.getAttribute("loginid"); String query = "select * from order_master where status='Pending' and login_id='"+id+"'"; ResultSet rs1= ConnectionService.select(query); while(rs1.next()) { count++; } String name[]= new String[count]; int price[]=new int[count]; String order[]=new String[count]; int sum=0; String query1 = "select * from order_master where status='Pending' and login_id='"+id+"'"; ResultSet rs= ConnectionService.select(query1); while(rs.next()) { price[j]=rs.getInt(6); name[j]=rs.getString(7); order[j]=rs.getString(1); sum+=price[j]; String query2="select * from stock_master where name='"+name[j]+"'"; ResultSet resa=ConnectionService.select(query2); while(resa.next()) { quant=resa.getInt(8)-1; } String query3="update stock_master where name='"+name[j]+"'"; int rsa=ConnectionService.update(query3); j++; }

String query4="select *from user_acc_detail where login_id='"+id+"'"; ResultSet red=ConnectionService.select(query4); while(red.next()) { bal=red.getInt(2); } int newbal=0; newbal=bal-sum; String query5="update user_acc_detail set balance='"+newbal+"' where login_id='"+id+"'"; int ress=ConnectionService.update(query5); %> <center> <table cellpadding="3" cellspacing="3" border="2"> <tr> <th> </th> <th> <font class="style9" color="#330066">ORDER ID</font> </th> <th> <font class="style9" color="#330066">NAME</font> </th> <th> <font class="style9" color="#330066">PRICE</font> </th> </tr> <h:form action="/remove"> <% for(int i=0;i<name.length;i++) { %>

<tr><td> <h:radio property="choice" value="<%=order[i]%>"/> </td> <td><font class="style9" color="#330066"> <%=order[i]%></font></td>

<td><font class="style9" color="#330066"> <%=name[i]%> </font></td> <td><font class="style9" color="#330066"> <%=price[i]%> </font></td> <% } %> <center><h:submit value="Remove from cart"/></center> </h:form> </table> </center> <br> <br> <center> <font class="style9" color="blue"> Total Bill :Rs <%=sum%> </font> </center> <%session.setAttribute("bill",sum);%>

</h:html>

REGISTRATIONACTION.JAV A package pack; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import utility.*; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForward; public class RegisterAction extends Action {

public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { RegisterBean rb = (RegisterBean)form; String fname=rb.getFname(); String mname=rb.getMname(); String lname=rb.getLname(); String id=rb.getId(); int basic=rb.getBasic(); String occupation=rb.getOccupation(); String email=rb.getEmail(); String password=rb.getPassword(); String confirm=rb.getConfirm(); String dob=rb.getDob(); String street=rb.getStreet(); String city=rb.getCity(); String state=rb.getState();

int pincode=rb.getPincode(); String country=rb.getCountry(); String query1 = "insert into member_detail (login_id,f_name,m_name,l_name,basic,e_mail,dob,street,city,pincode,state,country,job/ccupation) values('"+id+"','"+fname+"','"+mname+"','"+lname+"','"+basic+"','"+email+"','"+dob+"','"+street+"','"+ city+"','"+pincode+"','"+state+"','"+country+"','"+occupation+"')"; String query2= "insert into login_master(login_id,password,role,status) values('"+id+"','"+password+"','user','activated')"; String query3= "insert into user_acc_detail(login_id,balance) values ('"+id+"',5000)"; int rs1 = ConnectionService.update(query1); int rs2 = ConnectionService.update(query2); int rs3 = ConnectionService.update(query3); if(rs1>0) { request.setAttribute(" ","Account created"); } else { request.setAttribute("q","Not Signed up"} return mapping.getInputForward()} }

LOGINACTION.JAVA

Logipackage pack; import javax.servlet.http.*; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForward; import java.sql.*; import utility.*; public class LoginAction extends Action {

public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { LoginBean lb = (LoginBean)form; String id = lb.getLoginid(); String pass = lb.getPassword(); String query = "select *from login_master where login_id='"+id+"' and password='"+pass+"';"; ResultSet rs = ConnectionService.select(query); if(rs.next()) { HttpSession session = request.getSession(); session.setAttribute("loginid",id) if(rs.getString(3).equals("admin")) return mapping.findForward("admin"); else return mapping.findForward("user"); } else { request.setAttribute("q","INVALID USER..try again"); } return mapping.getInputForward(); } }

CARTACTION.JAVA package pack; import java.sql.ResultSet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForward; import utility.ConnectionService; public class CartAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession session = request.getSession(false); if(session.getAttribute("loginid")!=null) { CartBean cb = (CartBean)form; String choice = cb.getChoice(); String name= new String(); String cast= new String(); String director= new String(); String year= new String(); int price = 0; String loginid =(String)session.getAttribute("loginid"); int stockid = 0; String query = "select * from stock_master where name='"+choice+"'"; request.setAttribute("query",query); ResultSet rs= ConnectionService.select(query); if(rs.next()) { stockid=rs.getInt(1); name=rs.getString(2); cast=rs.getString(5); director=rs.getString(6);

year=rs.getString(7); price=rs.getInt(9); } String query1="insert into order_master (login_id,stock_id,quantity,status,price,name) values ('"+loginid+"','"+stockid+"',1,'Pending','"+price+"','"+name+"')"; int num=ConnectionService.update(query1); request.setAttribute("q",loginid); } return mapping.findForward("home");} }

REMOVEACTION.JAVA package pack; import utility.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.sql.*; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForward; public class RemoveAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession session = request.getSession(false); RemoveBean rb=(RemoveBean)form; String name=rb.getChoice(); int order=Integer.parseInt(name);

request.setAttribute("o",name); String query = "delete from order_master where order_id ='"+order+"'"; request.setAttribute("que",query); int rs= ConnectionService.update(query) if(rs>0) {request.setAttribute("a","deleted"); } else { request.setAttribute("a","not deleted"); } return mapping.getInputForward(); } }

TEST CASES

The test cases have been generated from an examination of pre/post condition describing the expected behaviour of operation and the concept of equivalence sets. The precondition states that the operation work correctly for any registration, be it empty or not. The post condition indicates what is a valid value to return. For this reference either a object or null value is valid return value. We can identify the normal, boundary and illegal test cases for the equivalence sets  Normal > 1 user  Boundary > 0 or 1 user  Illegal

TEST CASE FOR REGISTRATION MODULE:


The input equivalence sets have been modified as:  Users personnel details. The output equivalence sets have been modified as:  Null  Users information is submitted.

TEST CASE FOR LOGIN MODULE:


The input equivalence test sets are modified as:  The user id and password  Category The output equivalence test sets are modified as:  Null  personal details

TEST CASE FOR AUTHENTICATION MODULE:


The input equivalence sets is:  Users personal details The output equivalence sets is:  Either confirm or delete

TEST CASE FOR SEARCH :


The input equivalence sets is:  Search criteria information  User initial information The output equivalence sets is:  Either search successful or not

TEST CASE FOR ADD TO CART:


The input equivalence set is:  Items details are searched by user. The output equivalence set is:  Either item is added or removed.

TEST CASES FOR PLACE ORDER MODULE:


The input equivalence set is:  Item details added to cart by user. The output equivalence set is:  Either item is ordered or not.

FUTURE SCOPE

 The current system can be extended to allow the users to listen the music on Online Music World.  The users could subscribe for price alerts which would enable them to receive messages when price for products fall below a particular level.  The current system is confined only to the shopping cart process. It can be extended to have a easy downloading of the music from Online music world.  The current system can be elaborated and a user can vote for a song and view the highest voted songs.

BIBLIOGRAPHY

Books: The Complete Reference JSP 2.0(Phil Hanna) Instant Java Server Pages (Paul Tremblett) Struts In Action (David Winterfeldt )

Online help: www.google.com www.java.sun.com

Você também pode gostar