WebSphere Application Server Bible
* Offers clear understanding of the WebSphere Application Server installation and configuration
* Provides a complete guide to creating a WebSphere development environment with both WebSphere Studio Site Developer and WebSphere Studio Application Developer
* Includes extensive coverage of development for WebSphere including EJBs, JavaServer Pages, and Servlets
* Offers WebSphere Administrators solutions for session management and application packaging
Part I: Planning and Installation.
Chapter 1: Introducing WebSphere Application Server.
Chapter 2: Websphere Application Architecture.
Chapter 3: Introducing Web Services.
Chapter 4: Installing WebSphere Application Server 4.01.
Chapter 5: Preparing a Development Environment.
Part II: Application Development.
Chapter 6: Web Application Analysis and Design.
Chapter 8: How to Set Up Web Testing on WSAD.
Chapter 9: Java Servlet Development.
Chapter 10: More Servlet APIs.
Chapter 11: Understanding Session Management.
Chapter 12: Developing JavaServer Pages.
Chapter 13: Introducing Enterprise JavaBeans.
Chapter 14: Developing Enterprise JavaBeans with WSAD.
Chapter 15: Additional CMP and Transaction Processing.
Chapter 16: Deployment Descriptors and EJB Security Overview.
Chapter 17: EJB Best Practices.
Chapter 18: Using XML/XSLT in WebSphere.
Chapter 19: Developing Web Services.
Part III: Systems Administration.
Chapter 20: Configurating WebSphere Application Environments.
Chapter 21: Configuring Session Management.
Chapter 22: Using WebSphere's Application Packaging.
Chapter 23: Configuring Security.
Part IV: Managing WebSphere.
Chapter 24: Workload Management and Optimization.
Chapter 25: Using the Resource Analyzer.
Chapter 26: Troubleshooting WebSphere.
Chapter 27: Using the WebSphere Control Program.
Chapter 28: Managing WebSphere with XMLConfig.
Dave Ramirez is a Lead Solutions Developer at Commerce Solutions. He is certified in WebSphere Application Server, WebSphere Studio, DB2 7.1 and VisualAge for Java. Dave has a B.S. in Business Administration and a minor in Management Information Systems. Dave also contributes to Commerce Solutions training program and is a mentor/lead developer on most of his assignments. He has also submitted papers for publication.
Alan Sit is a Solutions Developer working at Commerce Solutions. He is IBM certified in WebSphere Application Server, WebSphere Studio and VisualAge for Java. In addition to his consulting, Alan helps develop training materials and is responsible for WSAD "Brown Bag" presentations. Alan has a B.S. in Business Administration with a minor in Computer Science. Alan is a regular speaker at the Northern California/SF WebSphere User Group.
|Download all the code from the book
This file contains source code, Enterprise Archive (EAR) files, and utilities necessary to set up the latest AlmostFreeCruise code.
|4.43 MB||Click to Download|
This companion Web site offers you the opportunity to download the code used in this
book in its entirety or by individual chapter. The following sections tell you more about
AlmostFreeCruise application and the code snippets used throughout the book. This
section explains how to do the following:
- Download files
- Configure the Cruise database and supporting tables
- Set up WebSphere Studio Application Developer workspaces
- Import a starting Enterprise Archive (EAR)
AlmostFreeCruise application is the primary example used in Parts II through IV
of this book. It's used to illustrate how you can use WebSphere Studio Application
Developer to modify some of the components and deploy to WebSphere Application Server
Advanced Edition (AE).
AlmostFreeCruise application has the following characteristics:
- It is a Web application that utilizes HTML, servlets, and JavaServer Pages (JSP).
- It conforms to the J2EE application assembly specification (using JAR, WAR, and EAR files).
- It is a starting point for the development of Enterprise JavaBeans (EJB).
- It is a demonstration application for deploying to WebSphere Application Server.
To date, no bugs have been reported in the
Two userids are used throughout the administrative chapters. These userids are
db2admin. The two userids require various
local security policies.
The WebSphere Administrative user (
wasadmin) and the DB2 Administrator
db2admin) have common characteristics. Userid profiling is performed
by the local Win2000 administrator to ensure the following:
- They are locally defined.
- They are part of the Administrators group.
- They are updated in the Local Security Policy of Win2000 by setting the following Local policies: User Rights Assignments to Act as Part of the Operating System and Log On as a Service.
db2admin, you should add the following characteristics:
- Increase quotas
- Create a token object
- Replace a process-level token
If you plan to jump around to various chapters throughout the book, be sure to create these userids first.WebSphere Bible Chapter Download File
The WAS4Bible.zip file, available on the download page, contains source code, Enterprise Archive (EAR) files, and
utilities necessary to set up the latest
AlmostFreeCruise code. All the code resides
in a single WinZip file. After you download the
Was4Bible.zip file, you can open it and
extract the contents by double-clicking it if you have WinZip on your system. If you
don't currently have WinZip, you can download an evaluation version from
When extracting the files, be sure to use WinZip's default options (confirm that the
Use Folder Names option is checked) and extract the
Was4Bible.zip file to a drive on your
system (such as C:) that has at least 3MB of available space. The extraction process
creates a folder called WAS4Bible. As long as the Use Folder Names option is checked
in the Extract dialog box, an entire folder structure is created within the WAS4Bible
folder. You see folders arranged by chapter number, and some of these chapter folders
contain the following files:
- Java files: These Java source files can be used to cut and paste code into the exercises.
- Starting EAR files: To begin some exercises you need to import the EAR file
to establish a baseline. These files are named
- Finished EAR files: You can load these EAR files if you wish to review the
completed coding done by the authors. These files are named
- DB2 scripts: Some of the examples utilize DB2 tables. You need these scripts to create a database, generate some tables, and load those tables with information.
Even though WebSphere Application Server can utilize many different relational
databases, this book focuses on IBM DB2 Universal Database. You will be installing
IBM DB2 Universal Database V7.2.1, Enterprise Edition for Windows. Chapter 4 shows
you how to install DB2 for WebSphere Application Server. If you are planning to
skip the sections related to WebSphere Application Server and are focusing only on
development, you need to use the following instructions to install DB2. The DB2 setup
can be divided into two phases. First, you go through installation of DB2 Universal
Database. Next, you have to create the
Cruise database and create and populate the
Cruise tables. All phases are described in the following sections.
Step 1: DB2 Installation
Although you can install a client version of DB2, the assumption here is that you are installing the database locally on your workstation.
Installing DB2 for the first time should be rather easy provided that you have the necessary space. To start, you must load either the WebSphere Application Server CD labeled as CD - DB2 Universal Database or a DB2 Universal Database Enterprise Edition CD. The following instructions guide you through the installation:
setup.exeon the CD. You are presented with the DB2 Welcome Page.
- With the mouse, find the Install menu and click Install.
- When asked to check which products to install, select DB2 Enterprise Edition only and click Next.
- The next screen is the Installation Type screen. In a normal situation, you could just select Typical; but for this installation, select Custom so that you can remove features that are unnecessary for WebSphere administration.
- In the Select Components screen, remove check marks from the DB2 Query Patroller Client, the DB2 Connect Server Support, Data Warehousing Tools, and the OLAP Starter Kit check boxes. These are features that are needed for data warehousing. Remember that you are trying to install the minimum database using the least amount of system resources. You should also change your destination folder on this page.
- When asked whether you want to create the default DB2 instance, answer Yes.
Note: When you reach the Enter Username and Password screen, type db2admin in both the userid and password fields. To make life easier as you continue, check the Use the Same Values for the remaining DB2 Username and Password settings check box.
- You should be prompted to create the db2admin userid. Accept the default.
- Continue with the installation until you reach the Setup Complete screen. At that point, reboot your system to complete the installation.
- After your system restarts, you should be presented with the First Steps
(Congratulations) window. You can also confirm installation success by verifying
in the Window services window that the following DB2 services have started:
- DB2 - DB2
- DB2 - DB2CTLSV
- DB2 - DB2DAS00
- DB2 Governor (not started)
- DB2 JDBC Applet Server
- DB2 JDBC Applet Server - Control Center (not started)
- DB2 License Server
- DB2 Security Server.
Step 2: Creating the necessary database and tables
You need to create the database and table and load test data into the tables. A set of files has been created to aid in creating the database and importing the data. To create the database, follow these steps:
- Navigate to the
x:\Bible\firststeps\codefolder by using a command window.
- Type db2cmd and press Enter.
- Another window opens. In the new window type db2 -tvf createdb.ddl and press Enter.
- Output appears that shows the connection to Cruise followed by a series of import statements showing the number of rows read and inserted.
- Close both command windows by typing exit.
That concludes your setup. You are now ready for the examples in this book.Creating WebSphere Studio Application Developer Workspaces
Beginning in Chapter 5, you work with WebSphere Studio Application Developer. You install WebSphere Studio Application Developer in Chapter 5. We provide this section to show you how to create a unique workspace to contain your source code. Throughout the book, you create unique workspaces for each chapter in order to keep the chapter code separated. But this is not necessarily the way you would handle things in a true development environment. Normally, you create workspaces that divide code so that you can reuse it.
When WebSphere Studio Application Developer is installed, it creates a default
shortcut on the Windows desktop. This shortcut uses the workspace in the
x:\Program Files\IBM\Application Developer\workspace folder. Follow these
steps to create a folder to hold your code:
- Start by creating a
codefolder. For example
- For each new chapter that requires a workspace, create another folder within
x:\codeto demarcate the example. For the chapter on EJBs, you could create the folder
Next, create a shortcut on your desktop that launches WebSphere Studio Application
Developer and points to the location of the workspace (
Follow these steps to create the shortcut:
- Create a shortcut on your Windows desktop by right-clicking the desktop and selecting New -> Shortcut.
- Type the following (be sure to type the quotation marks):
"x:\Program Files\IBM\Application Developer\wsappdev.exe" -data "x:\code\ejb"
- Click Next.
NOTE: Be sure to use the drive letter and folder where you installed WebSphere Studio Application Developer.
- Name the shortcut Chapter XX (Your descriptive name), and click Finish.
You now have a shortcut ready to start WebSphere Studio Application Developer.Importing an Enterprise Archive (EAR) file
In some of the chapters you need to import an Enterprise Archive (EAR) file to set down a baseline of code and resources. All of these startup EAR files are named CSICruiseStart.ear. To import an EAR file for a particular chapter, start WebSphere Studio Application Developer and follow these steps:
- Double-click your WebSphere Studio Application Developer shortcut.
- When WSAD starts, select FilešImport and select EAR File as the type of file to import.
- Using the file browser, navigate to the appropriate chapter and select
- Name the project AlmostFreeCruiseEAR and then click Finish to import the EAR file.
One convention is the drive letter of the installation. Whenever you see a reference to x: we are asking you to point to the drive letter where you installed the product or code.
Another convention used throughout the book is the installation reference or environment name for the various components. The table that follows shows those references.
|Component||Default install folder||Install reference|
|WebSphere HTTP plug-in||C:\WebSphere\AppServer||
|IBM HTTP Server||C:\Program Files\IBM HTTP Server||
Helpful Web Links
Here are some useful Web sites for WebSphere, WebSphere Studio Application Developer, and related technologies.