3.2 Portlet development and debugging

 < Day Day Up > 

3.2 Portlet development and debugging

WebSphere Portal Server is a J2EE Web application running on WebSphere Application Server, and provides a Portlet API for development of Java Web applications, called portlets, that have access to the services provided by the J2EE container, classes and tag libraries provided with WebSphere Application Server. We recommend users new to developing portlets refer to the following redbook publications to get started with the design and development of portal applications.

A Portal Composite Pattern Using WebSphere V4.1, SG24-6869, provides design patterns, information and guidelines for the development of portlet applications, including examples for WebSphere Portal.

WebSphere Studio Application Developer Programing Guide, SG24-6585, provides detailed information on developing Web applications using WebSphere Studio Application Developer.

3.2.1 Installing the Portal Toolkit with Application Developer

The IBM WebSphere Developer Domain library contains many useful articles and papers on developing portlets using the Portal Toolkit with WebSphere Studio Application Developer (Application Developer). We used two papers to guide us with the installation of the Portal Toolkit and WebSphere Studio Application Developer, including installation of the debugging environment using WebSphere Application Server Advanced Edition Single Server and WebSphere Portal Enable 4.1. In the following sections we describe the installation we performed.

For useful information, see the IBM WebSphere Developer Domain library at:

  • http://www7b.software.ibm.com/wsdd/

Installing prerequisite software

We recommend that you refer to the paper by Doug Phillips entitled Installing Prerequisite Software for the IBM Portal Toolkit Plug-in for WebSphere Studio Application Developer, which describes the installation of the following components on a Microsoft Windows 2000 platform. You can find this paper at:


  • WebSphere Application Server Advanced Edition Single Server

  • IBM DB2

  • WebSphere Portal Enable 4.1

  • WebSphere Studio Application Developer

Using this paper as our guide we performed the following steps making note here of the differences we encountered by using the software supplied on the CD-ROMs for WebSphere Portal for z/OS:

Install WebSphere Application Server

We used CD-ROM number 18 and started the installation by running setup.exe from directory \was\win. (Refer to Table 3-1 on page 94 for CD-ROM contents and their corresponding numbers.)

Install WebSphere Application Server Fixpack 2

Fixpack 2 is contained on CD-ROM 18, but rather confusingly in directory\was\win\fixpack4. We followed the rest of the instructions in the paper for applying the fixpack. Figure 3-2 shows the successful installation.

click to expand
Figure 3-2: WebSphere Application Server Fixpack2 installation

Install e-fix PQ56615

To run WebSphere Portal on WebSphere Application Server V402, e-fix PQ56615 needs to be installed and this e-fix was also available on CD-ROM number 18. Figure 3-3 on page 100 shows the successful installation of PQ56615.

click to expand
Figure 3-3: Successful installation of PQ56615 and configuring JDBC driver

Copy Personalization files needed by WebSphere Portal

WebSphere Portal needs personalization jar files:

  • personalisation.jar

  • prCommon.jar

We copied these from CD-ROM number 36, directory \wpcp\wcp\runtime\lib.

Install DB2 version 7.2

We installed DB2 Enterprise Edition V7.2 using CD-ROM number 1 by running setup.exe from directory \db2\win and following the instructions in the paper (the paper we referred to by Doug Phillips; see "Installing prerequisite software" on page 98 for information).

Install DB2 fixpack 7

CD-ROM number 10 contains DB2 fixpack 7 which we installed instead of fixpack 5 (referred to in the paper by Doug Phillips). We installed fixpack 7 by running setup.exe from directory \db2fp\win.

Configure the JDBC driver to use Java 1.2

Figure 3-3 shows the successful completion of configuring the JDBC driver in accordance with the instructions in the paper.

Install WebSphere Portal Enable V4.1

After starting WebSphere Application Server as shown in Figure 3-4 we used CD-ROM number 25 to run install.bat from directory \wps, in order to install WebSphere Portal Server.

click to expand
Figure 3-4: Starting WebSphere Application Server Advanced Edition Single Server

We followed all the steps, 1 to 28, in the paper noting the following details as we proceeded:

  • Step 16, select "Create and initialize a new database".

  • Step 25, we noticed and ignored some error messages "Failed reflecting values" during the deployment of the portal enterprise applications. The successful completion of this step is shown in Figure 3-5 on page 102.

    click to expand
    Figure 3-5: Installation of WebSphere Portal

  • On completion of Step 28 we tested that the portal was installed successfully and operational (Figure 3-6 on page 103) by browsing to:

    click to expand
    Figure 3-6: Accessing the portal from a browser


(Optional) Installing the Agent Controller

We did not install the Agent Controller, because in the next steps we will install WebSphere Studio Application Developer on the same system as WebSphere Application Server and WebSphere Portal.

Install WebSphere Studio Application Developer

We used CD-ROM number 22 and ran setup.exe from directory \wsad\win to install WebSphere Studio Application Developer.

Installing the Portal Toolkit

Doug Phillips wrote an additional paper on installing the Portal Toolkit, configuring it to use the installed Portal Server for debugging, and developing a first portlet to test the set-up. This paper, Developing and Debugging Portlets Using the IBM Portal Toolkit Plug-in for WebSphere Studio Application Developer, is available at:


Using this paper as our guide we performed the following steps:

  • Registered userid wpsdebug with the Portal Server.

  • Stopped WebSphere Application Server.

  • Used CD-ROM number 18 to run install.bat from directory \PortalToolkit to install the Portal Toolkit.

  • Configured the portal server instance in WebSphere Studio, taking note that on Step 6 of the paper you must un-check the box labelled "Use default WebSphere deployment directory", and on Step 13 change to port 9080.

  • Created MyFirstPorlet, published it to the portal Debug Server, and tested it by following Steps 1 through 6 in the paper.


Upon completion of these steps the portlet development environment was installed and configured to debug and test portlets using the WebSphere Portal Server installed on the Windows 2000 platform. Further information about developing portlets using WebSphere Studio Application Developer can be found in the IBM WebSphere Portal Developers Handbook, SG24-6897.

Portlets that have been developed using the portlet development environment can be exported as Web Application Archive (WAR) files from WebSphere Studio Application Developer as shown in Figure 3-7 on page 105 - by right-clicking on the project name, selecting Export WAR, and then transferring the WAR file to WebSphere Portal running on z/OS for subsequent deployment.

click to expand
Figure 3-7: Exporting a WAR file

 < Day Day Up > 

Websphere Portal on Z. OS
Websphere Portal on Z/OS
ISBN: 0738499382
EAN: 2147483647
Year: 2003
Pages: 90

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net