Sun Logo


Sun ONE Studio 4, Community Edition Tutorial

816-7868-10



Contents

Before You Begin

1. Getting Started

Software Requirements for the Tutorial

What You Need to Run the Sun ONE Studio 4 IDE

What You Need to Create and Run the Tutorial

Starting the Sun ONE Studio 4 IDE

Starting the IDE on Microsoft Windows

Starting the IDE on Solaris, UNIX, and Linux Environments

Modifying the Session With Command-Line Switches

Specifying Your User Settings Directory

Understanding the Sun ONE Studio 4 Directory Structure

Verifying the Correct Default Web 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 4 Web Module?

Creating the CDShopCart Web Module

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 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

Index