Home > AS/400 Tips > WebSphere Strategies for iSeries professionals > Get started building Java Web apps in WDSC
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WEBSPHERE STRATEGIES FOR ISERIES PROFESSIONALS

Get started building Java Web apps in WDSC


Jim Mason, Search400.com expert
08.22.2002
Rating: -4.50- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



[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


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Web Development
Migrating from RPG to EGL on IBM i
Groovy programming on IBM i
Running PHP open source applications: NOBODY needs authority
Zend Web software teams up with IBM System i
The best technologies and tools for System i programmers in 2009
Seven IBM i project lessons learned in 2008
AS/400 lessons from the past, present, and future: A holiday tale
Application modernization strategies for System i
RPG application modernization for i5
Web skills crucial to iSeries programmer professional development

Web Tools
Programming for the Web on the IBM i, what is possible
Zend Web software teams up with IBM System i
Using geocoding on AS/400 to enhance your Web presence
The iSeries Blog has a new home on IT Knowledge Exchange
The best technologies and tools for System i programmers in 2009
Search400.com Products of the Year 2008
Application modernization strategies for System i
Natively supported Web applications for Power running i
System i PHP authoring tool tries to fill void in Web-coding know-how
Lazy coder: What does PHP on the i5 mean?

Web Servers
System i no longer the stepchild of IBM's world
Connecting WebSphere to AS/400 for image retrieval
Weaving in WebSphere
SOA enhancements drive IBM WebSphere feature packs
SOA means money for IT workers
Enable J2EE app on WAS to access DB2
Securing Apache: Keeping patches current
IBM runs USOpen.org on Power boxes
MoMA's IT makeover a mix of old and new
How does RPG talk to a browser?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
WebSphere Development Studio Client (WDSC)  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


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.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts