0% found this document useful (0 votes)
17 views67 pages

Get WebSphere Application Server Express V6 Developers Guide and Development Examples 1st Ed Edition Bill Moore Free All Chapters

The document provides information on the 'WebSphere Application Server Express V6 Developers Guide and Development Examples' by Bill Moore, detailing its content, structure, and download links. It includes chapters on the development process, getting started with WebSphere, and development tools, aimed at new developers. Additionally, it offers links to other related ebooks for further exploration.

Uploaded by

khedrflees90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views67 pages

Get WebSphere Application Server Express V6 Developers Guide and Development Examples 1st Ed Edition Bill Moore Free All Chapters

The document provides information on the 'WebSphere Application Server Express V6 Developers Guide and Development Examples' by Bill Moore, detailing its content, structure, and download links. It includes chapters on the development process, getting started with WebSphere, and development tools, aimed at new developers. Additionally, it offers links to other related ebooks for further exploration.

Uploaded by

khedrflees90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Visit https://ebookfinal.

com to download the full version and


explore more ebooks

WebSphere Application Server Express V6


developers guide and development examples 1st ed
Edition Bill Moore

_____ Click the link below to download _____


https://ebookfinal.com/download/websphere-application-
server-express-v6-developers-guide-and-development-
examples-1st-ed-edition-bill-moore/

Explore and download more ebooks at ebookfinal.com


Here are some suggested products you might be interested in.
Click the link to download

Websphere J2ee Application Development for the IBM Server


Iseries Server 1st ed Edition Ibm Redbooks

https://ebookfinal.com/download/websphere-j2ee-application-
development-for-the-ibm-server-iseries-server-1st-ed-edition-ibm-
redbooks/

Java EE 5 Development using GlassFish Application Server


1st Ed. Edition David R. Heffelfinger

https://ebookfinal.com/download/java-ee-5-development-using-glassfish-
application-server-1st-ed-edition-david-r-heffelfinger/

Websphere Studio Application Developer Version 5


Programming Guide Programming Guide 1st Edition Ibm
Redbooks
https://ebookfinal.com/download/websphere-studio-application-
developer-version-5-programming-guide-programming-guide-1st-edition-
ibm-redbooks/

IBM WebSphere DataPower SOA appliance handbook 1st Edition


Bill Hines

https://ebookfinal.com/download/ibm-websphere-datapower-soa-appliance-
handbook-1st-edition-bill-hines/
Beginning Oracle Application Express 4 1st Edition Doug
Gault

https://ebookfinal.com/download/beginning-oracle-application-
express-4-1st-edition-doug-gault/

Oracle Application Express 4 Recipes 1st Edition Edmund


Zehoo (Auth.)

https://ebookfinal.com/download/oracle-application-
express-4-recipes-1st-edition-edmund-zehoo-auth/

Pro Oracle Application Express 4 2nd Edition Tim Fox

https://ebookfinal.com/download/pro-oracle-application-express-4-2nd-
edition-tim-fox/

SQL Server 2000 Fast Answers for DBAs and Developers


Joseph Sack

https://ebookfinal.com/download/sql-server-2000-fast-answers-for-dbas-
and-developers-joseph-sack/

MySQL Cookbook 2nd Edition Solutions Examples for Database


Developers and DBAs Paul Dubois

https://ebookfinal.com/download/mysql-cookbook-2nd-edition-solutions-
examples-for-database-developers-and-dbas-paul-dubois/
WebSphere Application Server Express V6 developers
guide and development examples 1st ed Edition Bill
Moore Digital Instant Download
Author(s): Bill Moore
ISBN(s): 9780738493671, 0738493678
Edition: 1st ed
File Details: PDF, 15.07 MB
Year: 2005
Language: english
Front cover

WebSphere Application
Server-Express:
A Development Example for New Developers

Application planning and design

Developing and testing using


WebSphere Express

Building a sample
application

Bill Moore
Mark Buensalido
Gwendolyn Gaumond
Bo Gong
Ilaria Gorla
Doug Grove
Ryan Karchner
Stelios Psarras
Pasi Valjus

ibm.com/redbooks
International Technical Support Organization

WebSphere Application Server: Express


A Development Example for New Developers

November 2003

SG24-6301-00
Note: Before using this information and the product it supports, read the information in
“Notices” on page xiii.

First Edition (November 2003)

This edition applies to Version 5.0 of WebSphere Studio and to Version 5.0 of WebSphere
Application Server - Express for use on Windows.

© Copyright International Business Machines Corporation 2003. All rights reserved.


Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP
Schedule Contract with IBM Corp.
Contents

Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx

Part 1. The development process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Our objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.1 WebSphere Application Server - Express defined . . . . . . . . . . . . . . . 4
1.2 The focus of this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 WebSphere Application Server - Express users . . . . . . . . . . . . . . . . . 5
1.2.2 Application stages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 How to use this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Chapter 2. Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11


2.1 The WebSphere platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1.1 Application servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1.2 Development environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.1.3 Which studio do I use for which server? . . . . . . . . . . . . . . . . . . . . . . 18
2.1.4 What if I have an iSeries? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2 What is WebSphere Application Server - Express . . . . . . . . . . . . . . . . . . 19
2.2.1 Simple to install and administer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.2.2 Simplifies enterprise-class tools and technologies . . . . . . . . . . . . . . 20
2.2.3 Easy migration path to other servers in the family . . . . . . . . . . . . . . 20
2.2.4 Summary of features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2.5 What can I do with WebSphere Application Server - Express? . . . . 21
2.3 Architecture and components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3.1 Web container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.4 Key technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.4.1 Java 2 Platform, Enterprise Edition. . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4.2 Java Database Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4.3 XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.4.4 Jakarta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Chapter 3. Development tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

© Copyright IBM Corp. 2003. All rights reserved. iii


3.1 WebSphere Application Server - Express, V5.0 . . . . . . . . . . . . . . . . . . . . 28
3.1.1 WebSphere Application Server - Express components . . . . . . . . . . 28
3.1.2 Deploying WebSphere Application Server - Express . . . . . . . . . . . . 29
3.1.3 Eclipse technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.1.4 WebSphere Application Server - Express tooling . . . . . . . . . . . . . . . 30
3.1.5 WebSphere Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.1.6 Express Application Server: Overview . . . . . . . . . . . . . . . . . . . . . . . 31
3.2 Information road map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.2 Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2.3 Application development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.3 Using WebSphere Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.3.1 Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.3.2 Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.3.3 Customizing perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.3.4 Using fast views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.3.5 Setting perspective preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3.6 The workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.3.7 Recovering files from their local history . . . . . . . . . . . . . . . . . . . . . . 44
3.3.8 Finding help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4 Struts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.4.1 Struts overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.4.2 Model-View-Controller architecture. . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.4.3 WebSphere Studio and Struts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.4.4 Web applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.4.5 Struts details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.4.6 Why we use Struts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.4.7 Components of a Struts-based application . . . . . . . . . . . . . . . . . . . . 59
3.4.8 Configuration of a Struts-based application . . . . . . . . . . . . . . . . . . . 63
3.5 Developing in a team environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.5.1 Team environment using WebSphere Studio . . . . . . . . . . . . . . . . . . 74
3.5.2 What is Concurrent Versions System . . . . . . . . . . . . . . . . . . . . . . . . 75
3.5.3 Using Concurrent Versions System with WebSphere Studio . . . . . . 76
3.5.4 Working in a team using CVS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
3.6 Common development tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
3.6.1 Creating projects in Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.6.2 Create a Java package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
3.6.3 Create a folder for Web content . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
3.6.4 Create a Java class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
3.6.5 Required common code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.6.6 Create a Struts Web diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.6.7 Create an SQL statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
3.6.8 Generate a JavaBean from an SQL statement . . . . . . . . . . . . . . . . 115

iv WebShere Application Server - Express, a development example


Chapter 4. The development process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.1 Development process basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
4.1.1 Definition of a development process . . . . . . . . . . . . . . . . . . . . . . . . 123
4.1.2 Importance of a development process . . . . . . . . . . . . . . . . . . . . . . 123
4.1.3 Realization of a development process . . . . . . . . . . . . . . . . . . . . . . 124
4.1.4 Development process principles . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
4.2 Starting a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
4.2.1 Understanding your business today . . . . . . . . . . . . . . . . . . . . . . . . 127
4.2.2 Where do you want to go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
4.2.3 An initial roadmap of how to get there. . . . . . . . . . . . . . . . . . . . . . . 127
4.3 Understanding and planning a project. . . . . . . . . . . . . . . . . . . . . . . . . . . 128
4.4 Building a solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
4.5 Project hand-over . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
4.6 RealEstate application architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
4.6.1 Component-based architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.6.2 Layered design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.6.3 Package structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.6.4 Naming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Part 2. The sample solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Chapter 5. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135


5.1 The business problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
5.1.1 Business background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
5.1.2 Business problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.2 Business objectives of the solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
5.2.1 Put company information online . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
5.2.2 Make all property information available in one place . . . . . . . . . . . 138
5.2.3 Communicate with customers online . . . . . . . . . . . . . . . . . . . . . . . 139
5.2.4 Benefit internal management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
5.3 Functional requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
5.3.1 Who are the application users?. . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
5.3.2 What can each group of users do? . . . . . . . . . . . . . . . . . . . . . . . . . 141
5.3.3 Customer registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
5.3.4 Agents account maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
5.3.5 Property search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
5.3.6 Customer interest list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
5.3.7 Business reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
5.3.8 E-mail communication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
5.3.9 Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
5.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Chapter 6. Building a prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147


6.1 Introduction to prototypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

Contents v
6.1.1 Benefits of building a prototype. . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
6.1.2 Before you start building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
6.2 Tools to use when building a prototype. . . . . . . . . . . . . . . . . . . . . . . . . . 150
6.3 Creating a prototype to our sample application . . . . . . . . . . . . . . . . . . . . 151
6.3.1 Create the Web project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
6.3.2 Create the menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
6.3.3 Update and use of the CSS file. . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
6.3.4 Create the logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
6.3.5 Search properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Chapter 7. Application architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177


7.1 Overview of the architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
7.1.1 Component-based development . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
7.1.2 Layered application design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.1.3 Usage of design patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
7.2 Component architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
7.2.1 PropertyCatalog component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
7.2.2 News component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
7.2.3 E-mail component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
7.2.4 InterestList component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
7.2.5 Reporting component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
7.2.6 User component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
7.2.7 Dependencies between the components . . . . . . . . . . . . . . . . . . . . 186
7.3 Layered architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
7.3.1 Presentation layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
7.3.2 Controller layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
7.3.3 Business facade layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
7.3.4 Domain layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
7.3.5 Data access layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

Chapter 8. Design and specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189


8.1 High level design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
8.1.1 Screen flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
8.1.2 User management and security . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
8.1.3 Database operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
8.1.4 User input validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
8.1.5 E-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
8.1.6 Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
8.1.7 Design of the managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
8.2 Detailed design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
8.2.1 Core functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
8.2.2 Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
8.2.3 Requests and responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

vi WebShere Application Server - Express, a development example


8.2.4 Database accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
8.2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
8.2.6 Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

Chapter 9. User registration and security. . . . . . . . . . . . . . . . . . . . . . . . . 209


9.1 User management basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
9.1.1 Underlying implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
9.2 User management component specification . . . . . . . . . . . . . . . . . . . . . . 211
9.2.1 User management component: the actors . . . . . . . . . . . . . . . . . . . 211
9.2.2 What the users can do: The use cases . . . . . . . . . . . . . . . . . . . . . . 212
9.2.3 View user details: UC.ViewUserDetails . . . . . . . . . . . . . . . . . . . . . 212
9.2.4 Request password: UC.RequestPassword . . . . . . . . . . . . . . . . . . . 213
9.2.5 Register customer: UC.RegisterCustomer . . . . . . . . . . . . . . . . . . . 214
9.2.6 Modify customer details: UC.ModifyCustomerDetails . . . . . . . . . . . 215
9.2.7 Log out: UC.Logout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
9.2.8 Log in: UC.login. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
9.2.9 List users: UC.ListUsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
9.2.10 Delete customer details: UC.DeleteCustomerDetails . . . . . . . . . . 217
9.2.11 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
9.2.12 Interfaces for other components . . . . . . . . . . . . . . . . . . . . . . . . . . 218
9.3 Building the user management component. . . . . . . . . . . . . . . . . . . . . . . 218
9.3.1 Preparing the workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
9.3.2 Creating the Java packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
9.3.3 Creating the Web section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
9.4 Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
9.5 The business layer (manager). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
9.5.1 LDAP Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
9.6 The model layer (DAO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
9.7 The domain layer (DTO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
9.8 The presentation layer (Struts) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
9.8.1 Log in/out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
9.8.2 Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
9.8.3 User details management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
9.8.4 Administrative view/modify/delete user details . . . . . . . . . . . . . . . . 248
9.8.5 Password e-mail request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
9.8.6 Security and guarding pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
9.9 Testing the component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
9.10 Room for improvement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
9.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

Chapter 10. Property catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267


10.1 Property catalog component specification. . . . . . . . . . . . . . . . . . . . . . . 268
10.1.1 Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268

Contents vii
10.1.2 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
10.1.3 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
10.2 Building the property catalog component . . . . . . . . . . . . . . . . . . . . . . . 271
10.2.1 Preparing the workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
10.2.2 Presentation layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
10.2.3 Controller layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
10.2.4 Business facade layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
10.2.5 Domain layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
10.2.6 Data access layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
10.2.7 Putting everything together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
10.2.8 Testing the component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

Chapter 11. Interest lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327


11.1 Interest list basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
11.1.1 What is implemented?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
11.2 Interest list component specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
11.2.1 Users of the interest list: the actors . . . . . . . . . . . . . . . . . . . . . . . . 328
11.2.2 What the users can do: the use cases . . . . . . . . . . . . . . . . . . . . . 329
11.2.3 Show interest list: ILC.ShowInterestList . . . . . . . . . . . . . . . . . . . . 330
11.2.4 Add property to interest list: ILC.AddProperty . . . . . . . . . . . . . . . . 330
11.2.5 Update interest list: ILC.UpdateInterestList. . . . . . . . . . . . . . . . . . 331
11.2.6 Clear interest list: ILC.ClearInterestList. . . . . . . . . . . . . . . . . . . . . 332
11.2.7 Return to property catalog: ILC.ReturnToPropertyCatalog . . . . . . 333
11.2.8 Checkout interest list: ILC.CheckoutInterestList . . . . . . . . . . . . . . 333
11.2.9 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
11.2.10 Interfaces for other components . . . . . . . . . . . . . . . . . . . . . . . . . 335
11.3 How to work faster and write stable code . . . . . . . . . . . . . . . . . . . . . . . 335
11.3.1 Use a component-based development process . . . . . . . . . . . . . . 335
11.3.2 Use a layered application framework . . . . . . . . . . . . . . . . . . . . . . 335
11.4 Building the interest list component. . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
11.4.1 Preparing the workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
11.4.2 Creating the Java packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
11.4.3 Creating the Web section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
11.5 A quick word about the database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
11.6 Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
11.7 The business layer (manager). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
11.8 The model layer (DAO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
11.8.1 What needs to be implemented? . . . . . . . . . . . . . . . . . . . . . . . . . 343
11.8.2 Building the DAO revealed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
11.9 The domain layer (DTO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
11.10 The presentation layer (Struts) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
11.10.1 What we need to end up with . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
11.10.2 Start with our adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

viii WebShere Application Server - Express, a development example


11.10.3 Create the Struts Web diagram. . . . . . . . . . . . . . . . . . . . . . . . . . 372
11.10.4 Create the form bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
11.10.5 Create the action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
11.10.6 Create the JSP or Web page node . . . . . . . . . . . . . . . . . . . . . . . 382
11.11 Testing the component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
11.11.1 Add property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
11.11.2 Update property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
11.11.3 Remove property. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
11.11.4 Clear list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
11.11.5 Checkout list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
11.12 Room for improvement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
11.13 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

Chapter 12. E-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397


12.1 JavaMail API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
12.1.1 Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
12.1.2 Core classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
12.1.3 Example: Sending an e-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
12.2 Build sample e-mail application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
12.2.1 Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
12.2.2 Business facade layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
12.2.3 Domain layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
12.3 Configuring JavaMail resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
12.4 Utility tag library mailer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412

Chapter 13. Administering the catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . 415


13.1 Component specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
13.1.1 Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
13.1.2 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
13.1.3 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
13.2 Building property catalog administration . . . . . . . . . . . . . . . . . . . . . . . . 421
13.2.1 Preparing the workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
13.2.2 Presentation layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
13.2.3 Controller layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
13.2.4 Business facade layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
13.2.5 Domain layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
13.2.6 Data access layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
13.2.7 Integrate the code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501

Chapter 14. Building a news component . . . . . . . . . . . . . . . . . . . . . . . . . 503


14.1 News component specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
14.1.1 Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
14.1.2 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
14.1.3 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506

Contents ix
14.2 Building the news component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
14.2.1 Preparing the workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
14.2.2 Presentation layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
14.2.3 Controller layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
14.2.4 Business facade layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
14.2.5 Domain layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
14.2.6 Data access layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
14.2.7 Putting everything together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
14.2.8 Testing the news component . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540

Chapter 15. Reporting component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547


15.1 Reporting component specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
15.1.1 Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
15.1.2 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
15.1.3 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
15.2 Building the reporting component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
15.2.1 Preparing the workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554
15.2.2 Presentation layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
15.2.3 Controller layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
15.2.4 Business facade layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
15.2.5 Domain layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
15.2.6 Data access layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
15.2.7 Putting everything together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
15.2.8 Testing the reporting component . . . . . . . . . . . . . . . . . . . . . . . . . 628

Appendix A. Deploying the redbook sample code. . . . . . . . . . . . . . . . . . 635


A.1 .Running the database creation script . . . . . . . . . . . . . . . . . . . . . . . . . . 636
A.1.1 Verifying the database creation . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
A.2 Setting up the WebSphere Studio workspace . . . . . . . . . . . . . . . . . . . . 638
A.2.1 Creating a test server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
A.2.2 Configure application properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 646
A.2.3 LOG4J properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647
A.2.4 Testing the sample application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647
A.3 Install on WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . . . 648
A.3.1 Testing the sample on WebSphere Application Server . . . . . . . . . 655

Appendix B. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661


Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
System requirements for downloading the Web material . . . . . . . . . . . . . 662
How to use the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662

Abbreviations and acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663

x WebShere Application Server - Express, a development example


Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665
IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665
Other publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665
Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669

Contents xi
xii WebShere Application Server - Express, a development example
Notices

This information was developed for products and services offered in the U.S.A.

IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area.
Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not give you any license to these patents. You can send license
inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A.

The following paragraph does not apply to the United Kingdom or any other country where such provisions
are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES
THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.

Any references in this information to non-IBM Web sites are provided for convenience only and do not in any
manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.

Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.

This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.

COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy,
modify, and distribute these sample programs in any form without payment to IBM for the purposes of
developing, using, marketing, or distributing application programs conforming to IBM's application
programming interfaces.

© Copyright IBM Corp. 2003. All rights reserved. xiii


Trademarks
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:

Redbooks (logo) ™ DB2 Universal Database™ Rational®


z/OS® DB2® Redbooks™
AIX® IBM® VisualAge®
ClearCase® Notes® WebSphere®
Cloudscape™ Rational Unified Process® IBM ™

The following terms are trademarks of other companies:

Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the United States, other countries, or both.

Other company, product, and service names may be trademarks or service marks of others.

xiv WebShere Application Server - Express, a development example


Preface

This IBM® Redbook is a practical guide for developing Web applications using
WebSphere Studio. We use the WebSphere Studio development environment
that is provided as part of WebSphere Application Server - Express to develop a
sample Web application targeted to the WebSphere Application Server - Express
runtime platform. We implement a sample scenario based on realistic
requirements for small and medium customers, and provide an end-to-end guide
for the development of this scenario.

Our focus is on describing a simple process that allows non technical readers to
understand and participate in the development of Web applications using
WebSphere Studio. Our target runtime environment is the Express Application
Server so we use the WebSphere Studio development environment that is part of
the WebSphere Application Server - Express installation. WebSphere
Application Server - Express, V5.0 offers a robust, easy-to-use Eclipse
technology-based development environment that allows developers to create,
build, and maintain dynamic Web sites, applications, and Web services. The
development tools offer the same development capabilities as WebSphere
Studio Site Developer with the exception that they are restricted to deployment
only to WebSphere Application Server - Express.

Note: During the development of this redbook, we used the WebSphere


Studio development environment provided with WebSphere Application
Server - Express, but you can easily migrate to more advanced configurations
of WebSphere Application Server and WebSphere Studio when you require
more sophisticated capabilities. As with all applications developed with
WebSphere Application Server - Express V5.0, our redbook examples can run
without alteration in more advanced configurations of WebSphere Application
Server, and can be developed in other configurations of WebSphere Studio
such as WebSphere Studio Site Developer and WebSphere Studio
Application Developer.

This means that the investment in skills acquired with WebSphere Application
Server - Express is protected when migrating to these other products. We
have deployed our redbook sample application to WebSphere Application
Server - Express V5.0.1 on Windows, and to WebSphere Application Server
V5.02 on Windows and AIX®. We have also developed and maintained the
sample application using WebSphere Studio Application Developer V5.0.1.

© Copyright IBM Corp. 2003. All rights reserved. xv


We focus our redbook Web application on a simple generic set of requirements
as we want to illustrate the principles of good Web application development
rather than examine problems particular to a business domain. We use a
component based development approach, and detail the steps to develop each
component of our application, using the same techniques for each component.
This enables our readers to use the same techniques and approach as a
template for developing components in their own applications.

The team that wrote this redbook


This redbook was produced by a team of specialists from around the world
working at the International Technical Support Organization, Raleigh Center.

William Moore is a WebSphere Specialist at the International Technical Support


Organization, Raleigh Center. He writes extensively and teaches IBM classes on
WebSphere and related topics. Before joining the ITSO, Bill was a Senior AIM
Consultant at the IBM Transarc lab in Sydney, Australia. He has 18 years of
application development experience on a wide range of computing platforms and
using many different coding languages. He holds a Master of Arts degree in
English from the University of Waikato, in Hamilton, New Zealand. His current
areas of expertise include application development tools, object-oriented
programming and design, and e-business application development.

Mark Buensalido is a Principal for idearanger, Inc. in Laguna Beach, CA.


Currently, he has been working with NewportWorks in Irvine, CA on a
WebSphere voice response product for real estate. He holds a bachelor’s degree
in Integrative Biology from the University of California at Berkeley, and has seven
years of experience in object-oriented software development. His areas of
expertise include database design and Web application development.

Gwendolyn Gaumond is a Senior Software Engineer for Twinstar Incorporated


in Westminster, CO. She holds a master’s degree in Information Technology from
Regis University, and has five years of experience in software development and
database design. Her areas of expertise include database administration and
design, as well as Web application development.

Bo Gong is a Senior Consultant for Lansa Inc, an IBM Business Partner. His
areas of expertise include the LANSA product family, iSeries application
development, and online business processing.

Ilaria Gorla is an Application Developer for IBM Global Services, in the


Application Management Services (AMS) department, Italy. She has three years
experience in software development. Her areas of expertise include IBM

xvi WebShere Application Server - Express, a development example


VisualAge® for Java, and e-business technology and Web application
development.

Doug Grove is a Lead Developer and Principal Architect at warpFactor Inc., a


Raleigh NC based company that specializes in Java and Web service
development. Doug has designed and implemented several WebSphere
e-commerce projects. He specializes in the design and implementation of LDAP
directory services. In his twenty years of professional experience, he has worked
primarily for the financial and telecoms sectors. He is also typically involved with
the specification, building, and deployment of hardware environments.

Stelios Psarras is a Senior e-business Solutions Consultant for Cyantific.net


Ltd, London, U.K. He has done extensive work with Java, J2EE, and related
technologies, and has been certified by Sun and IBM. He holds a Bachelor of
Science degree from the University of Glasgow, Glasgow, U.K., and is studying
for a Master’s of Science degree in Advanced Software Engineering degree at
the University of Westminster, London, U.K. His current areas of expertise
include e-business solutions architecture and development, object-oriented
analysis and design, design-patterns, frameworks, and refactoring code.

Pasi Valjus is a Senior Web Application Developer and Team Leader at Svenska
Handelsbanken based in Stockholm Sweden. He has a degree in economics and
software development. He has seven years experience in software development
including client/server and e-business technology solutions. His area of expertise
include development process, design, and development of Web applications with
Java and JavaServer Pages.

Ryan Karchner is an undergraduate student at Penn State University. He is


currently working toward a BS in Information Sciences and Technology, with a
minor in Business and Liberal Arts. His main area of interest is the integration of
information technology with financial investment, business management, and
business analytics. He joined the International Technical Support Organization
(ITSO) as a Co-op Pre-professional IT Specialist.

Preface xvii
Figure 0-1 The authors: Gwendolyn Gaumond, William Moore, Ilaria Gorla, Pasi Valjus, Stelios Psarras,
Mark Buensalido, Bo Gong, Doug Grove

xviii WebShere Application Server - Express, a development example


Figure 0-2 Ryan Karchner

Thanks to the following people for their contributions to this project:

Aaron Allsbrook
Gary Johnston
Kevin Postreich
Thomas Roche
IBM Raleigh

Maritza M. Dubec
Technical Editing
IBM ITSO San Jose

Become a published author


Join us for a two- to six-week residency program! Help write an IBM Redbook
dealing with specific products or solutions, while getting hands-on experience
with leading-edge technologies. You'll team with IBM technical professionals,
Business Partners and/or customers.

Your efforts will help increase product acceptance and customer satisfaction. As
a bonus, you'll develop a network of contacts in IBM development labs, and
increase your productivity and marketability.

Preface xix
Find out more about the residency program, browse the residency index, and
apply online at:
ibm.com/redbooks/residencies.html

Comments welcome
Your comments are important to us!

We want our Redbooks™ to be as helpful as possible. Send us your comments


about this or other Redbooks in one of the following ways:
򐂰 Use the online Contact us review redbook form found at:
ibm.com/redbooks
򐂰 Send your comments in an Internet note to:
[email protected]
򐂰 Mail your comments to:
IBM Corporation, International Technical Support Organization
Dept. HZ8 Building 662
P.O. Box 12195
Research Triangle Park, NC 27709-2195

xx WebShere Application Server - Express, a development example


Part 1

Part 1 The
development
process
This part contains an overview of the features provided by WebSphere
Application Server - Express, and describes a development process, which can
be used to develop dynamic Web applications using WebSphere Studio.

© Copyright IBM Corp. 2003. All rights reserved. 1


2 WebShere Application Server - Express, a development example
1

Chapter 1. Introduction
This chapter describes our objectives, our focus, and who benefits from the
contents of this redbook. We introduce the material covered by the book as well
as a description of the WebSphere Application Server - Express users who
benefit from its contents.

This chapter covers the following:


򐂰 Our objectives
򐂰 The focus of this redbook
򐂰 How to use this book

© Copyright IBM Corp. 2003. All rights reserved. 3


1.1 Our objectives
This book is designed to provide an overview the WebSphere Application Server
- Express platform, and the WebSphere Studio development environment. As an
overview of the specified material, this book will set forth concepts in terms that
attempt to avoid technical complexity.

The book provides a systematic approach to the Web application development


process, as well as a step by step worked sample that addresses the creation or
addition of commonly used areas of functionality for Web applications.

1.1.1 WebSphere Application Server - Express defined


WebSphere Application Server - Express is an offering that includes:
򐂰 Express Application Server
– A Web application server supported on Windows NT, Windows 2000,
Linux (Red Hat Advanced Server and SuSE), and iSeries platforms.
򐂰 WebSphere Studio
– A development environment designed for Web application construction
and deployment, supported on Windows NT, Windows 2000, Windows XP,
Red Hat, and SuSE.
– Provides the interface for systems management and operation of the
application server
򐂰 IBM Agent Controller
– Allows communication between the managing WebSphere Studio (either
on a workstation or on the same machine) and the application server
instance
򐂰 Sample applications
– Sample application code designed to show examples of the functionality
provided with the WebSphere Application Server - Express offering

The WebSphere Application Server - Express offering can be implemented with


Application Server - Express installed on the same machine with the Studio Site
Developer. Alternatively, Application Server - Express can be installed on a
separate server and is managed by WebSphere Studio installed on a
workstation.

4 WebShere Application Server - Express, a development example


1.2 The focus of this redbook
This book is intended for business and technical users who are developing a
dynamic Web application to solve a business problem. It outlines a sound
development process and illustrates the step-by-step use of WebSphere Studio
to build an application. It does not assume a deep technical background, but
rather is geared toward a WebSphere Application Server - Express user for
whom Web application development has not been a primary role.

1.2.1 WebSphere Application Server - Express users


It is useful to categorize Web application developers using WebSphere
Application Server - Express and WebSphere Studio into three general groups to
further illustrate the focus of this book. Table 1-1 gives an overview of these user
groups, which we then describe in more detail.

Table 1-1 User groups


User group User description

Group one A business user who has a primary


business role that is non-technical

Group two A user who has client-side and HTML Web


application development as part of their
primary business role

Group three A user who has Web application


development and sever-side development
and maintenance as their primary
business role

򐂰 Group one users


This represents a business user that has a primary role in a business that is
non-technical. While the users’ primary role is non-technical, they may be
tasked with design, development and deployment tasks either to build a new
application, update an existing set of static pages using with dynamic
functionality, or re-design an existing dynamic Web application to add
functionality or optimize performance. A group one user generally has a
working knowledge of HTML, page layout, and Web authoring tools.
򐂰 Group two users
These users usually have Web application development as part of their
primary business role. They may be tasked with creation of a Web application
or maintenance and the addition of functionality to an existing Web
application. Group two users are likely to be primarily focused on client-side

Chapter 1. Introduction 5
programming. The applications they develop will be focused on end-user
requirements. A group two user may also be responsible for monitoring the
availability of a Web application and its general maintenance. A group two
user is an HTML expert and uses DHTML to add functionality to Web pages.
This user has the capability to update or make changes to server-side code
(such as JavaServer Pages and Enterprise JavaBeans, and Java Servlets),
but they normally do not author server-side code.
򐂰 Group three users
These users have Web application development and sever-side development
and maintenance as their primary business role. These users will be involved
with Web application development at all phases of the development process,
but they will be focused on server-side development, and will develop code
(such as JavaServer Pages Java Servlets and Enterprise JavaBeans), which
is used by other developers.

The focus of this book is the WebSphere Application Server - Express user
described in group one. This book does not assume experience and technical
background in the principles of Web application development, and associated
protocols and technologies. For the purposes of this book, readers in the target
audience will be globally referred to as non-technical.

Group two and three users will find the content of this book to be a useful tool to
introduce the WebSphere Application Server - Express platform and WebSphere
Studio and a standard of development (best practices) for Web applications
using the WebSphere Application Server - Express platform. For the purposes of
this book, readers in groups two and three will be globally described as technical.

As this book is an overview, the users in groups two and three will be interested
in further detail and technical background on many of the topics addressed. This
book will provide resources for further education and technical background on
WebSphere Application Server - Express where appropriate.

For technical references on the WebSphere Application Server - Express


platform, please refer to these redbooks:
򐂰 IBM WebSphere Application Server - Express V5.0 Handbook, SG24-6555
http://www.redbooks.ibm.com/pubs/pdfs/redbooks/sg246555.pdf
򐂰 IBM WebSphere Application Server - Expess V5 Developers Handbook,
SG24-6555-01
򐂰 IBM WebSphere Application Server - Express V5.0.1 Administrators
Handbook, SG24-6976

6 WebShere Application Server - Express, a development example


1.2.2 Application stages
This book outlines a development process for building a new sample solution.
However, the principles set forth in the chapter covering the development
process and in the chapter covering design and specification can also be applied
by the reader when adding dynamic functionality to existing static pages, or
modifying a dynamic Web application.

1.3 How to use this redbook


The book is organized into two parts.

Part 1, “The development process” on page 1 is an overview of the Web


application development process, and the tools available within WebSphere
Studio. It contains the following chapters:
򐂰 Chapter 1, “Introduction” on page 3
An introduction to the material covered by this book.
򐂰 Chapter 2, “Getting started” on page 11
An overview of the WebSphere Application Server - Express platform, and the
types of business problems that can be solved using it.
򐂰 Chapter 3, “Development tools” on page 27
An overview of common tasks performed with WebSphere Studio and the use
of Struts.
򐂰 Chapter 4, “The development process” on page 121
Outlines a process that can be used when planning and building reliable and
scalable Web applications.

Part 2, “The sample solution” on page 133 describes a sample solution that
illustrates how to achieve areas of functionality commonly found in dynamic Web
applications. The sample solution provides a step by step explanation of how to
use WebSphere Studio to develop a Web application. This part includes the
following chapters:
򐂰 Chapter 5, “Requirements” on page 135
A complete listing of the required functionality (functional requirements) of the
sample solution.
򐂰 Chapter 6, “Building a prototype” on page 147
Describes a prototype and how to use it, then steps through the construction
of the sample solution prototype
򐂰 Chapter 7, “Application architecture” on page 177

Chapter 1. Introduction 7
Describes the layered architecture we use to build our sample application
򐂰 Chapter 8, “Design and specification” on page 189
Describes the finalized design of the sample solution
򐂰 Chapter 9, “User registration and security” on page 209
Describes the construction of user registration and security functions within
the sample solution
򐂰 Chapter 10, “Property catalog” on page 267
Describes the construction of the catalog and search features within the
sample solution
򐂰 Chapter 11, “Interest lists” on page 327
Describes construction of the order placement feature within the sample
solution
򐂰 Chapter 12, “E-mail” on page 397
Describes the construction of the e-mail response feature within the sample
solution
򐂰 Chapter 13, “Administering the catalog” on page 415
Describes the construction of the product administration feature within the
sample solution
򐂰 Chapter 14, “Building a news component” on page 503
Describes the construction of the feature used to enter new or featured items
within the sample solution
򐂰 Chapter 15, “Reporting component” on page 547
Describes the construction of the reporting feature within the sample solution

Deployment of the sample solution and instructions for obtaining the additional
materials needed to construct the sample are covered in Appendix A, “Deploying
the redbook sample code” on page 635, and in Appendix B, “Additional material”
on page 661.

While this book provides an overview, any discussion of the WebSphere


Application Server - Express platform would be incomplete without some level of
technical detail. For that reason, areas of interest for the technical readers of this
book will be annotated as follows:

In general, all topics of this book are tailored to meet the needs of the
non-technical reader. Technical readers should use this book as a guide and use
the resources suggested in each area for more technical depth.

8 WebShere Application Server - Express, a development example


Important: The focus and scope of our redbook evolved as the project
proceeded. We wanted to make sure that group one readers could understand
our book, but it was also important for us to implement our sample application
using best practices based on an architecture that would be suitable for a real
application. Building robust Web applications is not a trivial task, and often we
found it important to implement our sample in a way that initially seems
complex, but is the way that we believe has the greatest long term benefits, as
it provides a more realistic example of what is needed to make applications
robust and easy to maintain.

An initial working title of our redbook was Development for non-developers, but
we changed this to avoid generating unrealistic expectations among our
readers. Our redbook does cover material for a technical audience, as well as
for readers new to Web application development.

Chapter 1. Introduction 9
10 WebShere Application Server - Express, a development example
2

Chapter 2. Getting started


This chapter provides an overview of the WebSphere platform, and the business
problems that can be solved using this technology. We focus on WebSphere
Application Server - Express, and describe how to use this technology to develop
solutions for small and medium businesses.

The WebSphere platform forms the foundation of a comprehensive business


solutions framework; its exhaustive offerings are designed to solve the problems
of companies of many different sizes. For example, the technologies and tools at
the heart of the WebSphere platform can be used to build and deploy the core of
an international financial trading application, yet, they also fit very nicely as the
Web site solution for a neighborhood restaurant with an online menu, hours of
operation, and perhaps a Web-based table reservation or food delivery system.
Unfortunately, the complete and versatile nature of the WebSphere platform can
sometimes be the source of confusion for people who are trying to make
important decisions about platforms and developer toolkits for their business or
departmental projects. The goal of this chapter is to help you get started with
understanding the technologies, tools, and offerings in the WebSphere platform.

© Copyright IBM Corp. 2003. All rights reserved. 11


2.1 The WebSphere platform
Behind the scenes, the WebSphere platform provides the necessary
infrastructure for companies to automate new business processes quickly and
leverage existing ones more effectively. The server infrastructure of the
WebSphere platform provides companies with an enterprise-ready application
server for dynamic e-business applications. In addition, the server infrastructure
provides a modern and flexible integration framework for connecting disparate
applications. Then, in tandem with the server infrastructure products, the
WebSphere developer toolkits provide the modern tools required by application
development teams to produce these applications quickly.

Based on the Integrated Development Environment (IDE) concept, these toolkits


not only foster but also enhance team development. In addition, they provide
development teams with easy-to-use automation, debugging, and profiling tools.
Automation tools automate repetitive tasks through wizard-driven interfaces;
these wizards serve an important dual purpose of reducing the time spent on
many tasks, as well as reducing the chance of introducing defects. Modern
debugging tools with visual interfaces allow developers to find defects quickly.
Finally, profiling tools allow developers a unique and inside look at their
applications to help them identify and isolate performance bottlenecks.

Collectively, the server infrastructure products and developer toolkits enable


companies to design, develop, and deliver the dynamic applications that help
them stay competitive and connect with their customers. As described above, the
WebSphere platform can be broken up into two main categories:
򐂰 Application servers
򐂰 Developer toolkits

2.1.1 Application servers


Frequently, the application servers of the WebSphere family are referred to as
containers. In simpler terms, this means that Web-enabled applications reside in
the container. Programmers install their applications into the container, and they
configure the container for optimal delivery of the application. Finally, the
container is responsible for delivering the application to its end users. For simple
applications, delivery is merely responding to a request, looking up some
content, and sending a response. Although more complicated applications follow
the same general pattern, the requests they receive may involve aggregation of
data from several sources, complicated calculations, and sometimes formatting
for devices other than the Web browser. Indeed, the responsibility of the
application server is significant, which makes choosing an appropriate container
a very important decision.

12 WebShere Application Server - Express, a development example


Java: Lingua franca of the Web
The WebSphere Application Server family is a suite of servers that implement
the Java 2 Platform, Enterprise Edition(J2EE) specification. This simply means
that any Web applications that are written to the Java 2 Platform, Enterprise
Edition specification can be installed and deployed on any of the servers in the
WebSphere Application Server family. With the exception of WebSphere
Application Server - Express, the WebSphere Application Server family also
supports the advanced Enterprise JavaBean (EJB) specification. Starting with
the standard server, WebSphere Application Server, programmers can take
advantage of the power and flexibility of WebSphere’s implementation of the
Java 2 Platform, Enterprise Edition. The WebSphere implementation offers a
number of advantages over competitive offerings. So, at least one application
server in the WebSphere family will fulfill the requirements of any particular
project and the prerequisites of the infrastructure that supports it. To read more
about application server comparisons, please see:
http://www.theserverside.com

WebSphere Application Server family


There are four members in the family. Although they share a common
foundation, each product provides unique benefits to meet the needs of
applications and the infrastructure that supports them. In order of increasing
feature sets, the four members of the WebSphere family are:
򐂰 WebSphere Application Server - Express
򐂰 WebSphere Application Server
򐂰 WebSphere Application Server Network Deployment
򐂰 WebSphere Application Server Enterprise

WebSphere Application Server - Express


WebSphere Application Server - Express is the simplest version of the
WebSphere Application Server family. Although it is easy to think of WebSphere
Application Server - Express as the small sibling of the WebSphere Application
Server family, it is actually a very powerful and capable application server for
providing cost-effective, out-of-the-box, enterprise-class applications.

WebSphere Application Server


WebSphere Application Server is the next level of server infrastructure in the
WebSphere Application Server family. The base server product adds support for
the Enterprise JavaBean specification. WebSphere Application Server adds the
following capabilities:
򐂰 Full Java 2 Platform, Enterprise Edition V1.3 compatibility including an
enterprise-ready Java Message Service(JMS) provider based on IBM
WebSphere MQ technology

Chapter 2. Getting started 13


򐂰 Improved system management and administration through browser-based
administration, Java Management Extensions (JMX), UI, and XML
configuration

WebSphere Application Server Network Deployment


WebSphere Application Server Network Deployment is an even higher level of
server infrastructure for the WebSphere Application Server family. In addition to
the services of the WebSphere Application Server base product, it adds the
ability for clustering and failover. These features become more important at
larger enterprises as their applications tend to service a larger customer base
that have more elaborate performance and availability requirements.

WebSphere Application Server Enterprise


WebSphere Application Server Enterprise is the highest level of server
infrastructure for the WebSphere Application Server family. It supports
large-scale clustering, caching, content distribution, and dynamic workload
management. This level of application server also adds sophisticated connectors
for integrating disparate and legacy data sources.

2.1.2 Development environment


The WebSphere Studio family starts with the Eclipse project as the base. The
Eclipse project base is extended by the WebSphere Studio Workbench. The
workbench is not a standalone product; it provides the base and extension point
for WebSphere Studio.

The WebSphere Studio family is comprised of four members. As with the


application server family, each member fulfills the needs and requirements of
different businesses or projects. In order of increasing feature sets, the four
family members are:
򐂰 WebSphere Studio Site Developer
򐂰 WebSphere Studio Application Developer
򐂰 WebSphere Studio Application Developer Integration Edition
򐂰 WebSphere Studio Enterprise Developer

Figure 2-1 shows the relationship of the WebSphere Studio environments and
their features.

14 WebShere Application Server - Express, a development example


WebSphere Studio Enterprise Developer

WebSphere Studio Application Developer, Integration Edition


WebSphere Studio Application Developer

WebSphere Studio Site Developer J2C Tooling


(EXPRESS TOOLING) J2EE z/OS IDE
J2EE Tooling Extensions
Web Tooling Cobol
+ EJB Tooling + Workflow +
HTML, JSP, Servlet PL/1
Enhanced
Web Services Tooling Messaging
XML Tooling Enhanced Web
Unit Test Environment Services
Struts

WebSphere Studio Workbench


Universal Tooling Platform Will become basis for an open source
Provides frameworks, services project (not a product IBM sells)
and tool builders to focus Core Workbench technology basis for
on tool building all IBM Tooling

Eclipse
Java Tooling CVS Tooling Extensible Platform

Figure 2-1 WebSphere Studio product overview

The Eclipse foundation


All WebSphere Studio products share the Eclipse open source project as their
foundation. The Eclipse open source project is led and maintained by the Eclipse
consortium which is a group of companies that includes IBM. Their continuing
mission is to produce an open source, commercial-quality, and extensible
integrated development environment (IDE) that can be used for a variety of
software development projects as well as run on a variety of operating system
platforms. The Eclipse IDE boasts an extensible plug-in framework, which the
open source programming community has embraced wholeheartedly. The broad
versatility of the Eclipse IDE allows it to be used in the creation of enterprise
applications with Enterprise JavaBeans, standalone Java programs, embedded
Java programs, and C++ programs. New plug-ins that have a broad range of
usefulness are being released on an ongoing basis. For example, a recent
addition to the Eclipse IDE has been a C# editor. For more information on the
Eclipse project see:
http://www.eclipse.org.

Why use an IDE like Eclipse?


An IDE provides many advantages to software development projects. Visual
development environments such as Eclipse and WebSphere Studio allow

Chapter 2. Getting started 15


developers to see problems in their workspaces immediately. In addition, graphs
and diagrams allow developers to visualize data flow through an application.

WebSphere Studio Workbench


The WebSphere Studio Workbench is not a standalone product. It extends the
functionality of the Eclipse IDE and becomes the foundation for WebSphere
Studio. These sophisticated tools are exposed to the user through Eclipse’s
extensible plug-in framework. In addition to the functions provided by the Eclipse
tools, the WebSphere Studio Workbench provides the following features to
developers:
򐂰 Wizard-driven installation
򐂰 Wizard-driven code generators that apply software design patterns
behind-the-scenes
򐂰 Extensive library of sample applications and their explanations
򐂰 Complete, self-contained application test environments that support visual,
step-by-step debugging
򐂰 Simplified application assembly and deployment

WebSphere Studio Site Developer


The WebSphere Studio Site Developer product provides developers with a set of
sophisticated tools that facilitate rapid and efficient development. In addition to
the base Eclipse foundation, WebSphere Studio Site Developer adds the
following tools for developers:
򐂰 Visual XML editors and validators
򐂰 Java unit test environment (JUnit)
򐂰 Visual Struts editors and validators

WebSphere Studio Application Developer


The WebSphere Studio Application Developer product extends the tools that are
provided by WebSphere Studio Site Developer. It adds the following tools:
򐂰 Visual tools for creating and manipulating an Enterprise JavaBean
򐂰 Full support for the Java 2 Platform, Enterprise Edition specification

WebSphere Studio Application Developer Integration Edition


The WebSphere Studio Application Developer Integration Edition adds the
following tools:
򐂰 Tools for Java 2 Connectivity(J2C)
򐂰 Java 2 Platform, Enterprise Edition extensions such as workflow and
enhanced messaging

16 WebShere Application Server - Express, a development example


򐂰 Tools for developing enhanced Web services

WebSphere Studio Enterprise Developer


The WebSphere Studio Enterprise Developer product adds the following tools:
򐂰 z/OS® tools
򐂰 Enterprise Generation Language (EGL) tools

Table 2-1 shows a comparison of the tools supported in the WebSphere Studio
products.

Table 2-1 WebSphere Studio comparison matrix


Studio Studio Studio WebSphere
Site Application Application Studio
Developer Developer Developer Enterprise
Integration Developer
Edition

Web tools (includes JSP Yes Yes Yes Yes


and Java Servlets)

XML tools Yes Yes Yes Yes

Relational database tools Yes Yes Yes Yes

Java tools Yes Yes Yes Yes

EJB tools Yes Yes Yes

Web services tool Yes (no Yes Yes Yes


EJB Web
service
support)

Deployment tools (includes Yes (no Yes Yes Yes


EJB deployment and EJB
validation) support)

Team development Yes Yes Yes Yes


(includes CVS and
Rational® ClearCase® LT)

Debugger Yes Yes Yes Yes

Java Visual Editor Yes Yes Yes Yes

Profiling and logging tools Yes Yes Yes Yes

Component test tools Yes Yes Yes

Chapter 2. Getting started 17


Studio Studio Studio WebSphere
Site Application Application Studio
Developer Developer Developer Enterprise
Integration Developer
Edition

Server tools Yes Yes Yes

Enterprise services toolkit Yes Yes

Flow composition tools Yes Yes

Connector and adapter Yes Yes


tools

Enterprise service support Yes Yes

z/OS IDE Yes

Struts tools Yes Yes Yes Yes

Enterprise Generation Yes


Language tools

XML enablement (host) Yes

2.1.3 Which studio do I use for which server?


Generally, all of the WebSphere Studio products can be used with any server.
WebSphere Studio ships with WebSphere Application Server - Express, and it is
also possible to use other WebSphere Studio products with WebSphere
Application Server - Express. Yet, to take advantage of the advanced runtimes for
WebSphere Application Server Enterprise, it is necessary to use the advanced
tooling in WebSphere Studio Application Developer Integration Edition. So, it
follows that taking advantage of the advanced server runtimes requires the
advanced tooling.

2.1.4 What if I have an iSeries?


The iSeries platform is slightly different from the standard offerings of the other
supported platforms.

Server products
The server products, in ascending order of features, available on the iSeries
platform are:
򐂰 WebSphere Application Server - Express for iSeries

18 WebShere Application Server - Express, a development example


Exploring the Variety of Random
Documents with Different Content
mount, with or without a load on their shoulders. As the tide had till
now been too high to permit access to this spot by the beach, it was
one of the last in which Nicholas could have expected to see foes.
For want of something to do, he picked two or three flints out of a
layer which was bedded in the chalk within reach, and amused
himself with sending them down the steep, in order to watch what
course they would take. Leaning over, to follow with his eye the
vagaries of one of these, his ear was struck by a bumping, dead
sound, which could not be caused by his flint. Looking a little to the
right, without drawing back, he perceived something moving in the
shadowy track. But for the sound which had excited his suspicions,
he would have concluded that some cliff-raven or sea-bird had been
disturbed in its hole, and he watched intently for a few seconds to
discover whether this was not the case; but it soon became evident
to his sharpened sight that there was a line of men laboriously
climbing the track, each with his two small tubs braced upon his
shoulders. Whether they had a strong rope by which each might help
himself, or whether each supported the one above him, could not be
discovered from the distance at which Nicholas sat; nor could he
guess whether they were aware of his being so near.
He started up, and stood in the broad moonlight, fumbling for his
pistol, which was not quite so ready to his hand as it ought to have
been. A subdued cry spread up and down, from mouth to mouth,
among his foes, a large body of whom appeared instantly on the
ridge, from the hollow where they had collected unobserved. One of
them cried,--
"Hand over your pistol, lad, and sit down quietly where you were,
and we will do you no harm."
To do anything but what his officer had desired was, however, too
confusing to Nicholas's faculties to be borne. The order to fire as
soon as smugglers were perceived came upon his mind, as if
spoken at the moment in the Lieutenant's own voice, and saved him
the trouble of all internal conflict. He fired, and was instantly fired
upon in turn, and wounded. As he staggered far enough back from
the verge to fall on safe ground, he had the consolation of hearing
(after the cloud of flapping sea-birds had taken themselves far out to
sea) a repetition of shots along the cliffs on either hand, fainter and
shorter in the increasing distance. The ominous roll of the drum,--the
most warlike signal of the smugglers,--was next heard from the
hollow to the right, and more sea-birds fluttered and screamed.
Silence was gone; the alarm was given; and poor Nicholas need not
resist the welcome faintness that stretched him on the grass.
The smugglers, annoyed by former repeated failures in their
attempts to intimidate or gain over the Preventive watch, were now
exasperated by Nicholas's unflinching discharge of his duty; and
they determined to make an example of him, even in the midst of
their preparations to resist the force which they knew to be on the
way to attack them. The first necessary precaution was to range the
batmen who had been collected by the sound of the drum, in two
rows, from the vessel to the foot of the cliff, and again from the verge
of the cliffs to where the carts were stationed, surrounded with
guards. This being done, their pieces loaded, and their bludgeons
shouldered, a small party was detached to take possession of the
wounded man. On raising him, it was found that he was not dead,
and that it was by no means certain that his wounds were mortal.
When he recovered his senses, he felt himself lifted from the ground
by a rope tied round his middle, and immediately after was being
lowered over the edge of the precipice, carefully protected from
being dashed against the face of the cliff by the men who stood at
regular distances down the track, and who handed him from one to
the other till he reached the bottom, where two stout men received
him, and supported him on either side to a little distance along the
shingle.
"What are you going to do with me?" he faintly asked; but they
made no answer.
"For God's sake spare my life!"
"Too late for that, lad," replied one.
"No, not too late," said Nicholas, with renewed hope. "I don't think
you have killed me. I shall get well, if you will let me go."
"Too late, lad. You should not have fired."
"You are going to murder me then," groaned the victim, sinking
down upon a large stone where he had often leaned before, it being
the one from which he was wont to look out to sea. "I did not expect
it of you, for your people have always behaved very well to me.
Everybody has been kind to me," he continued, his dying thoughts
getting into the train which the spot suggested. "But, if you will do me
one more kindness, do, some of you, tell the lady at the station why I
could not come as she bade me. 'Come within the hour,' says she----
"
He stopped short on hearing two pistols cocked successively. No
duty to be done under orders being immediately present to his mind,
a paroxysm of terror seized him. He implored mercy for his mother's
sake, and, with the words upon his lips, sank dead before the balls
were lodged in his body as in a mark.
The proceeding was witnessed by some of his comrades, and by
his officer, from the top of the cliff; and fierce were the cries and
numerous were the shots which followed the murderous party, as
they quickly took up the body, and fell back among the crowd of
smugglers within the deep shadow where they could no longer be
distinguished.
The party being three hundred strong, any resistance which the
Preventive Force could offer was of little avail to check their
proceedings, as long as they were disposed to carry them on. They
persevered for some time in landing, hoisting up, and carting away
their tubs, the batmen keeping line, and frequently firing, while the
carriers passed between with their burdens. At length, a shot from
one of the guard, which took more effect than was expected,
seemed to occasion some change in their plans. They drew in their
apparatus, ascended the track in order, bearing with them the bodies
of their slain or wounded companions, and formed round the carts, in
order to proceed up the country, deserting a portion of the cargo
which was left upon the shore. The vessel, meanwhile, hoisted sail,
and wore round to stand out to sea.
"Can you see how many are killed or disabled?" inquired the
Lieutenant of one of his men. "What is this they are hauling along?"
"Two bodies, sir; whether dead or not, I can't say."
"Not poor Nicholas's for one, I suppose."
"No, sir; they have both their faces blacked, I see."
"We must get Christian burial for Nicholas, if it be too late to save
him," said the Lieutenant to his men, who were boiling with rage at
the fate of their comrade.
"They have pitched him into the sea, no doubt, sir, unless they
have happened to leave him on the beach as a mockery."
The procession passed with their load, like a funeral train; and to
stop them would only have occasioned the loss of more lives. There
were no stragglers to be cut off, for they kept their corps as compact
as if they had been drilled into the service, and practised in an
enemy's country. It was, in fact, so. They had been trained to regular
defiance of laws which they had never heard spoken of but in terms
of hatred; and whenever the agents of government were around their
steps, they felt themselves in the midst of enemies.
When the smugglers had proceeded so far inland as to be out of
danger, they made a halt, and gave three cheers,--an exasperating
sound to the baffled guard.
"Let them cheer!" cried the Lieutenant, "our turn will come next.
Down to the beach, my lads, before the tide carries off what belongs
to you there. If any of you can find tracks of blood, it may not be too
late for poor Nicholas, after all. Down to the beach, and seize
whatever you can find."
He remained for a few moments on the steep, ranging the horizon
with his glass, internally cursing the rapid progress that the lugger
(which few but Nicholas would have taken for a sloop, however deep
the shadow) was making in her escape.
"The cutter always contrives to be just in the wrong place," thought
he, "or to arrive too late when called. She will come, as she did
before, full sail, as soon as the smuggler has got out of sight, and
changed her course."
On joining his men, he found they had partly recovered their
spirits, amidst the booty which lay before their eyes. Some few had
given their first attention to searching for the body of their comrade,
but the greater number were insisting on the necessity of removing
the seizure to the Custom-house, before the tide should have risen
any higher. It was already washing up so as to efface any marks of
blood which might have remained on the shingle; and it seemed
most probable, in the absence of any clue, that the body of Nicholas
was being dashed in the surf which sent its spray among those who
defied its advances to the last, before they mounted once more upon
the down. They were obliged to leave a few tubs floating, after they
had secured the goods which it was most important to keep dry. If
these kegs could hold together amidst the dashing of the waves,
they would be recoverable in the morning from the sea, as the law
forbade all floating tubs to be picked up by anybody but the Coast
Guard, and the watch on the shore could keep an eye on the
observance of the law, for the short time that would be necessary.
"Brady, post off to the station-house, and let the ladies know we
are all safe but one. Stay! You will not thank me for sending you
away from your booty; and, besides, they will not believe you. I must
go myself. Halt a minute, my lads."
The officer directed his steps to the gleam which shone out
through the curtain of Matilda's window. Though he found her
voiceless, and his mother and sister in a state of restless terror, he
could not stay to revive them. The firing had seemed to them so
fearful that they would scarcely credit the testimony of their own eyes
that the Lieutenant was safe, or his assurance that only one life had
been lost on the side of the Preventive Force. He did not say whose
life that was, for he knew that there was not a man under his
command whom his wife would miss more than poor Nicholas. This
painful communication he left to the morning. With an assurance that
the enemy had all marched off, and that no dangerous duty
remained, the officer entreated his family to go to rest. It was very
probable that he might not come home till daylight, and it would now
be folly to waste any more anxiety upon him.
Elizabeth thought it really would be very foolish, though she
declared she did not expect to sleep a wink for a month to come.
She began her preparations, however, by putting up her work with
alacrity, and lighting her mother to her bedroom. Matilda went also to
hers, but not to remain. As soon as all was quiet, she stole down to
the fire-side, laid wood upon the embers, put out her light, and sat
down, preferring a further watch to broken dreams. The cracking of
the fuel and the ticking of the time-piece composed her agitated
thoughts; but, instead of cheerfulness, a deep melancholy
succeeded to the internal tumult of so many hours--a melancholy
which grew with that it fed on.
Matilda had not hitherto been given to deep thought, or strong
feeling, for any one but her husband; but the new influences of
circumstance, of late suspense and fear, of the hour, and of her
present social position,--all combined to stimulate her to higher
reflection than, as a light-hearted girl, she had been wont to
encourage. She would fain have known which of the men had fallen,-
-what home was to be made desolate by the tidings that must soon
be on their way. Were they to stun the young wife who, like herself,
had----O, no! It was too dreadful to think of! Were they to smite the
matron, who, ill her Irish cabin, daily told the little ones around her
knee tales of the brave and tender father who was to come back and
caress them one day? Were they to wither the aged parent, who
prayed for his roving son, and looked for the return of the prodigal
before he died; or the band of young kindred who watched with
longing the glory of their elder brother, and would be struck dumb at
this ignoble close of his envied service? Whoever it was, a life was
gone! And how? Men of the same country, members of the same
social state, had been made enemies by arbitrary laws. They had
been trained to deceive and to defy one another when they should
have wrought, side by side, to nourish life instead of to destroy it,--to
strengthen peace instead of inflicting woe. He who made the human
heart to yearn at the voice of kindliness, and to leap up at the tone of
joy, thereby rebukes the system which gives birth to mutual curses,
and flings sorrows into many homes;--He who gradually discloses to
the roused human ear the music of His name, does it for other
purposes than to have it taken upon human lips in mockery as a
pass-word to the meanest frauds;--He who made yon glittering sea a
broad path by which his children might pass to and fro, so that the
full may bear bread to the hungry, and the skilful send clothing to the
naked, must pity the perverseness by which such mutual aid is
declined, or yielded only at the expense of crime--artificial crime,
which brings on natural, as its sure consequence;--He who scatters
his bounties over the earth with impartial hand, his snow and
sunshine, his fruits and gems;--He who lets loose his herds on the
plains of the tropics, and calls the fishy tribes into the depths of Polar
seas;--He who breathes upon the cornfields, and they wave; who
whispers among the pine-forests of the North, and they bow before
him,--thus works that men may impart and enjoy; and yet man will
not impart, and forbids his fellow-man to enjoy;--He who in still small
voice says to the Hindoo beneath the palm-tree, "Get thee a home;"
who visits the broken sleep of the toil-worn artizan to bid him get
food and rest; who comes in the chill wind to the shivering boor to
warn him to provide apparel; who scares the crouching Arab with
thunders among the caverned rocks, and the Greenlander with
tempests on the icy sea, and the African with wild beasts in the sultry
night, that out of their terror may arise mutual protection and social
ease,--is daringly gainsaid by intermeddlers, who declare that one
nation shall have scanty food, and another miserable clothing; and
that a third must still find holes in the rocks, or a refuge in the trees,
because neither wood nor iron shall be given for habitations. Shall
there not come a day when the toil-worn Briton shall complain, "I
was hungry, and ye gave me no food;" and the Pole, "I was naked,
and ye clothed me not;" and the Syrian wanderer, "I was houseless,
and ye sheltered me not;" and the gem-decked hungering savage, "I
was poor and miserable, and ye visited me not, nor let me enrich you
in return?" When will men learn that the plan of Divine Providence
indicates the scheme of human providence; that man should
distribute his possessions as God scatters his gifts; that, as man is
created for kindliness and for social ease, he should be governed so
as to secure them; that, as all interests naturally harmonize under a
law of impartial love, it is an impiety to institute a law of partiality, by
which interests are arbitrarily opposed? When will men learn that it
should be with their wrought as with their natural wealth,--that, as the
air of heaven penetrates into all hidden places, and nourishes the life
of every breathing thing, all the elements of human comfort should
expand till they have reached and refreshed each partaker of human
life; that as the seeds of vegetation are borne here and there by
gales, and dropped by birds upon ridges and into hollows, the means
of enjoyment should be conveyed to places lofty or lowly in the social
scale, whence the winged messengers may return over the deep
with an equal recompense? When will governments learn that they
are responsible for every life which is sacrificed through a legislation
of partiality; whether it be of a servant of its own, murdered by
rebellious hands, or of a half-nourished babe dying on its sickly
mother's knee, or of a spirit-broken merchant, or of a worn-out
artizan? When will the people learn that, instead of acquiescing in
the imposition of oaths which they mean to break, of a watch which
they permit to be insulted and slaughtered, of a law which they bring
up their children to despise and to defy, they should demand with
one voice that freedom in the disposal of the fruits of their toil, upon
which mutual interest is a sufficient check, while it proves a more
unfailing stimulus than any arbitrary encouragement given to one
application of industry at the expense of all others? When shall we
leave the natural laws which guide human efforts as they guide the
stars in their courses to work, without attempting to mend them by
our bungling art? When shall man cease to charge upon Providence
evils of his own devising, and pray for deliverance from the crimes
he himself has invented, and from the miseries which follow in their
train? We implore that there may be no murder, and put firelocks into
the hands of our smugglers. We profess our piety, and hold the Bible
to unhallowed lips in our custom-houses. We say "Avaunt!" to all that
is infernal when we bring our children to the font, and straightway
educate them to devilish subtilty and hatred. We weekly celebrate
our love for our whole race, and yet daily keep back a portion of the
universal inheritance of man. O, when will man come in singleness
of heart before his Maker, and look abroad upon His works in the
light of His countenance!
Matilda's eyes were shining tearful in the firelight when her
husband entered.
"Hey! tears, my love? I saw no tears when there was more cause,-
-two hours ago."
"I had no time for them then," said Matilda, brushing them away.
"And why now? Do you dread more such nights, or are you worn
out, or----"
"No, no; it was not for myself. It was shame.--O, I am so
ashamed!"
"Of me, love? Do not you like my duty? or, do I not perform it
well?"
"O, no, no. I am so ashamed at the whole world, and especially at
our own nation, which thinks itself so Christian. Here we send one
another out man-hunting. We make a crime, tempt a man into it, and
punish him for it. Is this Christian?"
"It would be a disgrace to paganism."
"We are proud of being made in God's image, and we take pains
to make human governments the reverse of the Divine. How dare we
ask a blessing upon them?"
"Come, come, my good girl, you must think of something more
cheerful. The hearing of a life being lost has been too much for you.
You never were so near the scene of a murder before, I dare say."
"Never," replied Matilda, with quivering lips.
"It will not affect you so much again. You will become more used to
the circumstances of such a situation as ours. You will feel this sort
of adventure less painfully henceforward."
"But I do not wish that," was all that Matilda chose to say, lest her
sorrow should be charged upon discontent with her individual lot.
She looked out once more upon the sea, darkening as the moon
went down, and satisfied herself that the time would come for which
she had been inquiring,--when man would look above and around
him, and learn of Providence.
Chapter VII.

HEAR THE NEWS!

All was bustle about the nearest Custom-house when the seized
vessel and goods were expected to arrive the next morning. The
magistracy in the neighbourhood were also busy, for there seemed
to be no end to the offences against the law which had arisen out of
the adventure of the preceding night.
The first steps taken were towards the discovery of the murderer
of Nicholas; and, for this purpose, application was made to
government for aid, in the shape both of police-officers and of an
offer of reward for the disclosure of the murderers. Little was hoped
from the latter proceeding, as the smugglers were known to yield
powerful protection to each other, and to be united by a bond of
honour as strongly in each other's defence as against the law. If
Nicholas's murderers were known to every dweller along the coast,
from Portsmouth to the North Foreland, there was little probability
that any one would step forward to name or lay hands on them. But,
the little that government could do,--pry about and offer bribes, was
done; and, whether or not the guilty persons might tremble or flee,
every body else laughed.
One of the gipsy band was brought up before two justices of the
peace on violent suspicion of having, after eight in the evening, and
before six in the morning, made, aided, or assisted in making, or
been present at making, a signal, by means of light, fire, flash, blaze,
signal by smoke, and so forth, through all the offences described in
the appropriate clause of that most singular statute ordained for the
prevention of smuggling. No proof could be brought, though the truth
of the charge was generally believed, and the gipsies thereby
became more popular than ever. They were dismissed, and every
body laughed.
A boy was brought up, on a charge of trespass, by a farmer, who
complained that his fenced land had been entered and trampled, and
his well and bucket made use of without leave. The boy pleaded that
he had entered for the purpose of putting out a fire which he
suspected to be intended for a signal to smugglers. The justices
referred to the statute, found that "it shall be lawful," &c., to commit
this kind of trespass, and that the boy had only done his duty. And
now, every body frowned.
A woman who had been caught standing near a tub of the spirits
which had been seized, which tub was staved, was brought up on
the charge of having staved the same. The penalty was so heavy as
to tempt to a vast deal of false swearing on her behalf, by dint of
which she escaped; and her friends and neighbours laughed again.
She was not the less glad of this issue that, being a poor person, she
would have been supported while in prison by a daily allowance
drawn from the pockets of the nation.
A crew of fishermen were summoned to show cause why they
should not, according to law, pay the treble value of a floating keg of
gin, which, having bumped against their boat at sea, they had
stretched out their hands to appropriate. There was no use in
denying the act, as it had been witnessed by two keen eyes through
unimpeachable glasses, from a headland. All that the fishermen
could do was to swear that they only meant to deliver over the spirits
to the Custom-house officers, and were prevented from doing so by
being arrested immediately on landing. The magistrates considered
this a very doubtful case; and, having before their eyes the fear of
the collective power of their smuggling neighbours, gave their
decision in favour of the fishermen; whereat the informers were
indignant, and the folks in waiting exulted.
All parties had by this time had enough of this ceremony; but the
justices agreed in assuring the Lieutenant, that if they chose to look
strictly into the proceedings of their neighbours, and to inflict all the
punishments ordained in the statute for all the modes of offence
specified therein, they might be constantly occupied from morning till
night; the gaols would be filled; there would be a distraint for
penalties in almost every cottage, and offenders would be nearly as
common as persons who stood above five feet in their shoes. They
entertained him with a sight of the entire statute, as he was not
acquainted with the whole; and all thought it perfectly consistent with
their exemplary loyalty to decide that it was truly an extraordinary
specimen of legislation. The justices could no more boast of the
achievements of their authority in putting down smuggling than the
officer of his efficiency in preventing it. All shook their heads,
complimented each other's exertions, and desponded about the
availableness of their own.
"What is to be done?" was the commonplace query which ensued.
"Why, you see," said one of the justices, "the prohibiting a
commodity does not take away the taste for it; and if you impose a
high duty, you only excite people to evade it, and to calculate the
average rate of the risk of detection. That being done, there will
always be abundance of speculators found to make the venture, and
no lack of customers to bid them God speed."
"Then there are two ways of demolishing the practice,--lowering
the duties, so as to remove the temptation to smuggling; and
increasing the difficulty of carrying on a contraband trade."
"I should say there is but one," replied the first speaker.
"Difficulties have been multiplied till we who have to administer the
law groan under them, and smuggling is still on the increase."
"What is government about all the time?" asked the Lieutenant.
"They must know this, and yet they let their own power be mocked,
and the interests of our manufacturers and commercial men be
sacrificed."
"Of our manufacturers, but not necessarily of all our commercial
men. Contraband trade is a fine thing for certain shopkeepers; and
you might hear some curious stories below there," (nodding towards
the Custom-house,) "about certain methods of obtaining drawbacks,
and then re-landing the goods by the help of our night-working
neighbours. However, government is getting a glimpse of the true
state of the case, as we shall soon see."
"Because," observed the other magistrate, "government is
beginning to look to the right quarter for information. It is nonsense to
consult collectors of the revenue, and persons in their interest and of
their way of thinking, about the best method of rendering taxes
effectual. The only way is to contemplate the interests of the tax
payers. This done, it is easily seen that there is not much wisdom in
a system, the enforcement alone of which costs the country many
hundred thousand pounds a year."
"And which is not enforced, after all, and never can be. No, no; the
government sees now that the only way is to lower the duties down
to the point which makes contraband trading a speculation not worth
attempting."
"What makes you suppose that government views the matter in
this light?"
"It is said, and confidently believed in London, that government
has taken into consideration this petition from the principal silk-
manufacturers in and about London."
The Lieutenant read the petition in the newspaper, of recent date,
now handed to him.
"Hum. 'This important manufacture, though recently considerably
extended,'--aye, so it ought to be, from the increasing number of
wearers of silk,--'is still depressed below its natural level'--they are
tired of Spitalfields subscriptions, I suppose, and of living among
starving weavers, who throw the blame of their starvation on their
masters;--'by laws which prevent it from attaining that degree of
prosperity which, under more favourable circumstances, it would
acquire.'--Well! what thinks the House of this petition?"
"That will be seen when government speaks upon it. It is thought
that the prohibition of foreign silks will be removed, and a moderate
duty substituted. If so, it will be an important experiment."
"I rather think," observed the other magistrate, "that the fault will
soon be found to be neither in the undue mildness of the law, nor in
our way of administering it,--of both which the customs and excise
officers are for ever complaining. I believe my friend here and I shall
have little less reason to bless the change than these petitioning
manufacturers."
"There will be enough left for me to do," observed the Lieutenant,
"if, as I suppose, they will leave as they are the duties on articles not
produced at home. Many a cargo of gin and tobacco will yet be
landed in my day. Meanwhile, I must go and see the unpacking at
the Custom-house. I hope I shall not be tempted to smuggle within
those very walls, on my wife's account."
When the officer arrived at the Custom-house, he found the
Collector and Comptroller invested with all the dignity of active office,
and the members of the Coast Guard who were there to claim their
share of booty, watching with eagerness for the unpacking of a large
store of that beloved weed which was wont to "cheer but not
inebriate" them on their watch. A few inquisitive neighbours were
peeping in from window and door, and Mr. Pim, admitted through
favour, from his son being the Collector's clerk, paced up and down,
his countenance exhibiting a strange alternation of mirth and
vexation. He could not help enjoying the fun of people eluding, and
baffling, and thwarting one another; such fun being one chief
inducement to him to connect himself as he had done with
contraband traders; but it was a serious vexation to see some of his
property,--goods on whose safe arrival he had staked the earnings of
his irksome school-hours,--thus about to fall into the hands of those
who had paid no such dolorous price for them.
Somebody wondered that, as the smugglers had taken time to
carry away so considerable a portion of their cargo, a large package
of tobacco should have been left behind; tobacco being an
exceedingly valuable article of contraband trade, from the difference
between its original cost and its price when charged with the duty. If
smugglers paid threepence a pound for their article, and sold it at
half-a-crown, it must repay their risks better than most articles which
they could import. One of the guard believed he had seen numerous
packages of tobacco on the people's shoulders, as they passed to
the carts, and supposed that the quantity before them formed a very
small portion of what had been landed.
"Most likely," observed the Collector. "There is more tobacco
landed than there is of any thing else, except brandy and geneva. It
is high time government was bestirring itself to put down the
smuggling of tobacco. Do you know, sir," (to the Lieutenant,) "these
fellows supply a fourth part of the tobacco that is consumed in
England?"
"That is nothing to what they do in Ireland," observed Brady.
"There were seventy vessels in one year landing tobacco between
Waterford and Londonderry."
"Yes; the Irish are incorrigible," replied the Collector; "they
smuggle three-fourths of the tobacco they use."
The Lieutenant doubted whether they were incorrigible. Neither
the Irish, nor any body else, would think of smuggling unless they
were tempted to it. If the duty, now three shillings per pound, were
reduced to one shilling, smuggling tobacco would not answer; the
sinning three-fourths would get their tobacco honestly, and
government would be the gainer. The same advantage would arise
in England from the reduction of the duty; as, in addition to the
practice of smuggling being superseded, the consumption of the
article would materially increase, as is always the case on the
reduction of a tax. With every augmentation of the duty from eight-
pence per pound to three shillings, there had been a failure of
consumption at the same time with an increase of contraband trade;
so that the revenue had suffered doubly, and to an extent far beyond
its gains from the heightening of the duty.
"What have we got here?" cried Pim, as a gay-coloured article was
drawn out from among the packages.
"Flags! Aye; these were clever fellows, and knew their business,
you see. Here are pretty imitations of navy flags, and a fine variety.
British, Dutch, French! They knew what they were about,--those
fellows."
"So do you, it seems, Mr. Pim," observed the Collector. "You are
as wonderfully learned in flags as if you had taken a few trips to sea
yourself."
"I have lived on this coast for many a year, and seen most of the
flags that wave on these seas," replied Pim. "But since these flags
are but poor booty, it is a pity your men cannot catch those that
hoisted them, and so get a share of the fine."
"Suppose you put them on the right scent, Mr. Pim. I fancy you
could, if you chose."
Mr. Pim disclaimed, with all the gravity which his son's presence
could impose. A parcel of bandanas next appeared, and as the
familiar red spotted with white appeared, a smile went round the
circle of those who anticipated a share of the seizure.
"Ho, ho! I suspect I know who these belong to," observed the
Collector. "There is a gentleman now not far off on this coast who
could tell us all about them, I rather think. He has been sent for from
London, under suspicion of certain tricks about the drawback on the
exportation of silks. His shop is supplied very prettily by our
smugglers, and his connexion with them is supposed to be the
inducement to him to make large purchases at the India sales. I have
no doubt he is one of those who buy bandanas at four shillings a
piece, and sell them at eight shillings, when they have had a trip to
Ostend or Guernsey. I have a good mind to send for him."
"This is the last sort of commodities I should think it can be
pleasant to you Custom-house folks to declare forfeited," observed
Pim. "Your consciences must twinge you a little here, I should think. I
don't doubt your tobacco and your brandy being duty-paid, and all
proper; but when paying duty will not do, you will offend, just like
those who are not government servants, rather than go without what
you have a mind to. I'll lay any wager now----"
"Hold your impertinent tongue, sir," cried the Collector.
Mr. Pim obeyed, taking leave to use his hands instead. He
stepped behind the Collector, and quietly picked his pocket of a
bandana: he did the same to the Comptroller; and afterwards to all
the rest, though the land-waiter whisked away his coat-tail, and the
tide-waiter got into a corner. The only one who escaped was the
clerk (Pim’s own son), and he only because his having one round his
neck made the process unnecessary. A goodly display of bandanas,-
-real Indian,--now graced the counter, and everybody joined in Pim's
hearty laugh.
"Now," said he, "if you summon Breme on the suspicion of this
property being his----"
"So you know who the gentleman was that I was speaking of,"
cried the Collector. "Very well. Perhaps you can tell us a little news of
this next package."
And forthwith was opened to view a beautiful assortment of figured
silks, of various colours, but all of one pattern. Mr. Pim gravely shook
his head over them.
"If you know nothing of those, I do," said Brady, taking out his
tobacco-box, and producing therefrom the snip of silk which had
been extracted from Elizabeth's glove. "'Tis the same article, you
see; and the Lieutenant here declares 'tis English."
"And so it is, and so are these," declared the Collector. "The
French would be ashamed of such a fabric as this, at the price
marked, though they might own the figure; which must be imitated
from theirs, I fancy. We had better send for Mr. Breme, and let the
other Custom-house know of this seizure. I suspect it will throw
some more light on the tricks about the drawback."
Mr. Breme was found to be nearer at hand than had been
supposed. Having failed in his speculation, through two unfortunate
seizures of contraband cargoes, he had cut but a poor figure at the
larger Custom-house, where he had just been examined, and found
it necessary to consult with his Brighton brother as to the means of
getting the threatened fine mitigated, or of paying it, if no mercy
could be obtained. He was proceeding along the coast to Brighton,
when Pim, who was aware of his movements, met him, and told him
of the adventures which had taken place at Beachy Head.
What was to be done? Should he slip past to Brighton quietly, at
the risk of being brought back in a rather disagreeable way, or
should he make his appearance at once, and brave the
circumstances, before more evidence should be gathered against
him from distant quarters? The latter measure was decided upon;
and Breme, after changing his directions to the post-boy, leaned
back in his chaise to ruminate, in anything but a merry mood, on the
losses which he had sustained, was sustaining, and must expect still
further to sustain.
Breme had lately become a merchant in a small way, as well as a
shopkeeper. He had followed the example of many of his brethren in
trade, in venturing upon a proceeding of some risk, in hopes that
large profits would cover the loss of the occasional failures which he
had to expect. He had employed his Spitalfields neighbour to
manufacture a fabric in imitation of French silk, and had exported the
produce as English, receiving at the Custom-house the drawback
granted to such exportation. This drawback was the remission, or
paying back, of the duties on the article to be exported; such
remission being necessary to enable the exporter to sell his
commodity in the foreign market on equal terms with the foreign
manufacturers, who were less burdened with taxes. Breme claimed
and received this drawback, he and his agents swearing, in due
form, according to the statute, that the goods were really for sale
abroad, and should not be relanded. The oath was considered
merely as a necessary form; and Breme had no notion of selling his
goods in a foreign market at a lower price than would be given for
them in England, under the supposition that they were French. Back
they came, therefore; and the government, which had paid the
drawback, besides having thereby made a very pretty present to Mr.
Breme, saw an addition made to the stock of the already
overstocked market at home, while the weavers of silk were starving,
and it was charitably contributing to frequent subscriptions for their
relief. Mr. Breme was now, however, a loser in his turn, his beautiful
goods being clutched by the strong hand of the law. In addition to
this trouble, he was suffering under the prospect of a speedy end
being put to this kind of speculation.
He could not decide what line of defence to take till he reached the
Custom-house, and heard the nature and amount of the evidence
that there might be against him. When he was told that the case was
to be followed up very diligently, and exposed as a warning; that the
silks were known to be of the same kind as those for which he had
had to answer in another place; and that the manufacturer and
weavers would be produced to swear to the origin of the whole,--he
offered to make oath that he had sold the goods abroad, and that
their being afterwards smuggled back again was the act of his
customers, and not his own. The Collector congratulated him that,
this being the case, he was not subjected to the loss which some of
his friends had regretted on his account. It was, indeed, a much
pleasanter thing to have sold the goods and pocketed the money
than to see such a beautiful lot of goods, prepared at so much cost,
and with so much labour and ingenuity, now lying a forfeit to the
offended British law. With a bitter sweet smile, Mr. Breme bowed in
answer to this congratulation, and changed the subject. He observed
that days of comparative leisure were apparently at hand for all the
gentlemen he saw around him. If government should carry into other
departments the changes it was about to make in the silk trade,
there would be an end of many of the little affairs with which the time
of the Custom-house officers was now so fully and disagreeably
occupied.
What did he mean? Did he bring any new information?
Merely that government was about to remove the prohibition on
the importation of foreign silks, and to substitute an ad valorem duty
of 30 per cent.
"Bless my soul, sir! what an extraordinary thing!" cried the
Collector. "You do not mean that you are sure of the fact, sir?"
Mr. Breme had it from the best authority.
"Why 'extraordinary?'" asked the Lieutenant. "The nature of our
business this morning is proof enough that some change is
necessary, is it not?"
"To be sure," replied Breme; "but the change should be all the
other way. Do you know, sir, the market is deluged already with silk
goods from the late slight mourning, and from a change of fashion
since? What are we to do, sir, when the French pour in a flood of
their manufactures upon us?"
"Our market is glutted because we can find no vent for our
produce; and I do not see how the matter could be mended by
increasing the inducements of smugglers to supply us, while our
weavers are starving in the next street. If the French silks are, on the
average, 25 per cent. cheaper than ours, a duty of 30 per cent. will
leave our manufacturers a fair chance in the competition with
foreigners, and will throw the trade of the smugglers into their hands.
My only doubt is, whether the duty is not too high,--whether there is
not still some scope left to smuggling enterprize."
"Your countrymen are much obliged to you, I am sure, sir," said
Breme, tartly. "I think government should know that some of its
servants are ill-disposed to their duty."
The Lieutenant dared the shopkeeper to say this again, in the
midst of the witnesses of what his conduct had been on the
preceding night. Breme meant only,----and so forth.
Anxious and perplexed were all the faces now, except the
Lieutenant's own. His men had only a vague idea that something
was to happen to take away their occupation, and to do a great
mischief. Their officer bade them cheer up, and told them that it was
only to the article of silk that the reported regulations would relate.
"There is no knowing that," sagely observed the Collector. "When
they begin with such innovations, there is no telling where they will
leave off. With such a fancy once in their heads, Ministers (though
God forbid I should say any evil of them!) will not stop till they have
ruined the revenue, and laid waste the country under the curse of an
entirely free trade."
"I dare say they will be wise enough to retain duties which all
classes allow to be just; and the levying of them will afford you quite
sufficient occupation, Mr. Collector, if our trade increases, as it is
likely to do under such a system," replied the Lieutenant. "This little
custom-house may no longer be wanted as a store-place for
contraband goods; but there will be all the more to do in the large
ports; and there, sir, you may find an honourable and appropriate
place."
Neither the Collector nor any of his coadjutors, however, could be
consoled under the dire prospect of the total ruin of the revenue,
which was the result they chose to anticipate from the measures
understood to be now in contemplation. Their only ground of hope
was, that the British manufacturers would rise in a body to
remonstrate against the sacrifice of their interests. This, however,
considering that the most eminent of the body had already petitioned
for the opening of the trade, offered a very slender promise of
consolation.
Pim had early slipped away to spread the news of the
contemplated "ruin of the coast." The tidings spread from mouth to
mouth, till they filled every cottage, and reached even the recesses
where the gipsies made a home. Draper and Faa came forth over
the down to hear what the schoolmaster had to tell, and returned
thoughtful to the tent where Mrs. Draper was looking out for them.
"Then the winters will pass over us in a ceiled house," said she,
when she had heard the news. "We must join our tribe in London
from the first autumn fog till the last spring frost."
"You and yours," said one of the men, who was weaving the rush
bottom of an old chair. "We men may work in the free air, though
there will be stones instead of turf under our feet. Many chairs to
mend in London."
"But no night-play to fill the pocket and sharpen the spirits," old
Faa observed. There was nothing in cities that he liked so well as his
task of the last night,--to stand on the ridge as a watch upon the
sentinel, and stoop, or hold himself erect, according as the sentinel
turned his back or his face, that the lads in the furze might know
when to creep forward on all-fours, and when to lie still. It was far
pleasanter to see them all collected safe in the shadow of Shooter's
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like