Before you begin
This tutorial provides a hands-on approach to developing Struts-based portal applications using WebSphere® Studio Application Developer V5.1.2 and the Portal Toolkit V5.0.2.2. These tools are available for both WebSphere Studio Site Developer, which comes with WebSphere Portal, and Application Developer. The Portal Toolkit functions the same way in both tools.
The popular Struts framework adds a flexible control layer for building Web-based applications using common standard technologies like servlets, JavaBeans components, resource bundles, and custom tag libraries. Primarily, Struts focuses on modeling navigation throughout an application; however, it also provides many other benefits, particularly with form validation and resource handling. In addition, with Struts it's easy to implement custom tags that help you control how elements on JSPs function -- for instance, form input fields can manage values and submissions.
Struts functions by using a controller mechanism that manages all requests, comparing them to a deployment descriptor that maps necessary components. This conflicts with a similar WebSphere Portal concept, where the portal engine manages the control of incoming requests. As a workaround, WebSphere Portal provides a Struts Portal Framework bridge that manages the flow of requests between the portal environment and the Struts framework (among other things).
In the past, implementing this Struts Portal Framework in a portal application was mainly a manual and sometimes kludgey process that required you to always begin with an existing Struts-enabled portal application (never mind the philosophical "portlet or the egg" question). Thankfully, now the Portal Toolkit V5.0.2.2 provides some slick and rather complete tools to aid such projects.
Who should take this tutorial?
This tutorial is aimed at portal developers who want to implement Struts into their portal or, I suppose, Struts developers who want to develop portlets.
This tutorial simply describes the process of implementing Struts in your portal; you really don't need to be an expert with either Struts or portlet development in order to take it. However, if you pay attention, you might learn a little about both in the process.
In short, it's for any Web developer who cares, and maybe a few that don't.
To complete the steps in this tutorial, you need the following software installed on your computer:
- WebSphere Studio V5.1.2
- Portal Toolkit V5.0.2.2
- CutAndPasteCode.txt
The CutAndPasteCode.txt file contains code snippets used in some of the steps throughout the tutorial. You can use this file to easily cut and paste code from (unless you prefer to test your spelling skills by typing it all by hand).
Download both WebSphere Studio (Site or Application) Developer V5.1.2 and the Portal Toolkit V5.0.2.2. Install WebSphere Studio, accepting all defaults, and run the Portal Toolkit installer, installing both the toolkit and the test environment.

