[TABLE]IBM's WebSphere Development Studio Client (WDSC) for iSeries is a powerful, easy-to-use tool for building every type of Web application you can think of.
The following Guided Tutorial Steps show how to build some simple Java Web applications quickly that access iSeries data and call RPG programs with a browser interface. If you need an introduction to WDSC and it's basic navigation concepts, take a look at the online help in WDSC or download the first tutorial in the QuickWebEducation series: 1- QWE WDSC Java project workbench basics- >> Learn how to build Java apps quickly with WDSC (QWE_WDSC_tutorial_1_EclipseWorkbenchJava_jem.zip) from http://groups.yahoo.com/group/QuickWebSupport/files. (You'll have to register, but it's free.)
Our web application uses a sample Employee table IBM ships with DB2 UDB Common Servers (Windows, Linux etc) in the SAMPLES database. You do the example below following the same steps substituting another physical file on your AS/400 for the Employee table and following the instructions noted below on changing the location of your DB2 driver and configuring the database connection to the AS/400 database.
The web application we build will use IBM wizards to generate the Java application:
Basic setup steps to build Java Web applications in WDSC would normally include:
Steps to create the Web database application:
Steps to create the Web program application:
Our Web database application in action
The Web database application is generated by the Database application wizard in WDSC. It is simple but typical of a useful Web database application for a simple Employee phonebook. The application lets a user do the following:
Documentation conventions used in this tutorial:
In this tutorial there are sequences of instructions in the WDSC Workbench of Site Developer that we abbre
To continue reading for free, register below or login
To read more you must become a member of Search400.com
');
// -->

viate to save space. Common examples of sample instructions and the corresponding abbreviations are shown below:
Example 1: The instruction sequence:
On the Workbench main menu, select Window option, then Preferences option
is abbreviated to:
Workbench > Window > Preferences
Example 2: The instruction sequence:
"Select anObject, then use the Right Button mouse button to open the object Menu"
Is abbreviated to:
anObject RBmenu
Example 3: The instruction sequence:
The block of instructions below shows a sequence of user actions alternating with system responses. For example, the action in this group (Enter the project name: ctw2_test1, click create CSS file and click Next) is followed by the system response beginning with << (<< the Project configuration workbook opens showing source, projects, libraries). After you execute 1 or more actions in sequence, the system response provided is identified by the prefix "<<".
Create a database model for the iSeries data library
Create a variable to refer to your Java database driver
Add an environment variable in the WDSC workbench to refer to your database driver classes. Your application will need to access the specific Java database access classes to connect to a database of that type. Classpath variables allow your application to refer to objects without hard-coding the actual location in your application, a big plus for flexible configurations.
For a DB2 UDB connection in Windows, Linux, etc, the driver zip file is db2java.zip. For a remote iSeries connection, the driver file is JT400.jar. (You can search your WDSC install directories to find the JT400.jar driver location.)
Steps
Using the back button, go to the input page again and rerun the application to see how much faster it runs. Look at what happened with ONE click.
* The test WebSphere application server configuration and instance is created in the workbench
* The test WebSphere server is started.
* The application is published.
* A Web browser is opened.
* Your input form is invoked in a test browser.
Look at what you built
Your generated Web application is built on the MVC2 architecture (* Model - view - controller) where a controller servlet directs the application flow, the model is the Java beans that hold data information, and the View is composed of the generated JSPs.
Can you improve this application? During the definition phase in the database application wizard you could have customized all the Web forms to a fair degree using styles, editing, different labels and so on.
How much Java did you need to know to build and run a Java Web application?
The answer. Much less than anyone else on any other platform needs to know to do the same thing. What does that mean? Normal iSeries programmers can learn the basics of building Web applications using WDSC in a few days of focused training using QuickWeb Guided Tutorials or mentored training combined with IBM's examples and online help.
What else has to be done to deliver Web applications?
Realistically you need GOOD help in several key areas:
* WebSphere planning, configuration and support
* Application architecture and design
* Technical training tailored effectively to your specific needs and skill sets
* Application component development to maximize use of generation wizards
The key conclusions to draw: With the WDSC toolset and the right technical assistance, your existing developers can start delivering a wide variety of working Web applications after only minimal training in WDSC.
Your next steps
--------------------------
About the author: Jim Mason is president of ebt-now.com, and he writes, consults, teaches, designs and develops iSeries Web applications using Java, WebSphere, DB2, Lotus Domino and the WebSphere Development Tools for iSeries.