15
SUBMITTED BY: HARSH PAREEK B.TECH VII TH SEM. I.T. A Presentation On JSP & Online Shopping Cart

Harsh Pareek

Embed Size (px)

Citation preview

Page 1: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 1/15

SUBMITTED BY:

HARSH PAREEK

B.TECH VIITH SEM.

I.T.

APresentation

On JSP

&Online Shopping Cart

Page 2: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 2/15

What is JSP?

Mostly HTML page, with extension .jsp

Include JSP tags to enable dynamic contentcreation

 Translation: JSP → Servlet class 

Compiled at Request time

(first request, a little slow) Execution: Request → JSP Servlet's service

method

Page 3: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 3/15

Client

request

 JspEngine

& Web-server

 JspFile Component

response

request

response

response

request

Data passed between client & server

 Jsp architecture

Page 4: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 4/15

Why JSPs?

Goal: Create dynamic web content (HTML,XML, ...) for a Web Application

Goal: Make it easier/cleaner to mix staticHTML parts with dynamic Java servlet code

 JSP specification ver. 2.0

 Java Servlet specification ver. 2.4

Page 5: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 5/15

 Advantages

Code -- Computation

HTML -- Presentation

Separation of Roles Developers

Content Authors/Graphic Designers/Web Masters

Supposed to be cheaper... but not really...

Page 6: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 6/15

 Action Elements

Standard Actions

Custom Actions

Page 7: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 7/15

Standard Actions

<jsp:getProperty>Gets a property value from a JavaBeans componentand adds it to the response

<jsp:setProperty>Set a JavaBeans property value

<jsp:include>Includes the response from a servlet or JSP page during the request processing phase

<jsp:forward>

Forwards the processing of a request to servlet or JSPpage

Page 8: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 8/15

Custom Actions (Tag Libraries)

Can Define Your own!

Description

Define Install

Declare

Use

Page 9: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 9/15

Shopping Cart Application

The Shopping Cart application enables an end user to search a

specific book in an online data base, place an order for it and

also purchase it online.

The application also enables you to manage a data stored in a

database for the online displayed books, such as:-

• adding a book,• adding a book category,

• modifying the book information.

Page 10: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 10/15

 

To create the Shopping Cart application, we have used:-

• JSP as server side scripting language,

• JavaScript for client side data validations,

• HTML for data display,• Oracle as the database to store information.

Page 11: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 11/15

Database Connectivity

Step1: loading a database driver

Step2: creating a oracle jdbc connection

Step3: creating a JDBC statement objectStep4: executing a SQL statement with the

statement object, and returning a

JDBC result.

Page 12: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 12/15

CODD RULES

 The Information Rule

Guaranteed Access Rule

Systematic treatment of null values

 The database catalog must be relational

too

 The system must implement a comprehensivedata sublanguage

Data views must be updatable

Page 13: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 13/15

High level insert,update

and deletePhysical data independence

Logical data independence

Integrity independence•Entity integrity 

•Refrential integrity 

Distribution independenceNonsubversion

Page 14: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 14/15

 

Thank You.!

Page 15: Harsh Pareek

8/3/2019 Harsh Pareek

http://slidepdf.com/reader/full/harsh-pareek 15/15