Sun Logo


Sun ONE Studio 5 Web Application Tutorial

817-2320-10



Contents

Before You Begin

1. Getting Started

Obtaining and Installing the Required Software

Starting the Software

Starting the IDE

Starting the Application Server

Confirming Sun ONE Application Server 7 as the Default Server

Creating the Tutorial Database Table

2. Introduction to CDShopCart

Functionality of the Tutorial Application

Application Scenarios

Application Functional Specification

User's View of the Tutorial Application

Architecture of the Tutorial Application

Application Elements

Service Component Details

Overview of Tasks for Creating the Tutorial Application

Creating a Web Module

Using the JSTL Tag Libraries

Creating the Supporting Elements

Testing the Application

End Comments

3. Creating the CDShopCart Application

Creating a Web Module

What Is a Sun ONE Studio 5 Web Module?

Creating the CDShopCart Web Module

Setting the Web Application's Context Root

Using JSP Tags to Fetch and Display Database Data

What Is a JSP Tag?

Using JSTL Tags

Creating the CD Catalog List Page

Creating the Shopping Cart Page and Supporting Elements

Creating the CartLineItem Bean

Creating the Cart Bean

Creating the Shopping Cart Page

Testing the Shopping Cart Page

Creating the Three Message Pages

Creating the Empty Cart Page

Creating the Place Order Page

Creating the Cancel Order Page

Testing the Three Message Pages

A. CDShopCart Source Files

ProductList.jsp Source

CartLineItem Bean Source

CartLineItemBeanInfo Source

Cart Bean Source

ShopCart.jsp Source

EmptyCart.jsp Source

PlaceOrder.jsp Source

CancelOrder.jsp Source

B. CDShopCart Database Scripts

Script for a PointBase Database

Script for an Oracle Database

Script for a Microsoft SQLServer Database

Script for an IBM DB2 Database

C. Creating the Tutorial with an Oracle Database

Connecting the IDE to an Oracle Database

Enabling the Oracle Type 4 JDBC Driver

Connecting the IDE to the Oracle Server

Creating the Database Tables

Viewing the Database Tables in the IDE

Creating the CDShopCart Application with an Oracle Database

Index