Karl Bishop (firstname.lastname@example.org), Senior Software Engineer, IBM
Ron Lynn (email@example.com), Senior Software Engineer, IBM
26 Oct 2005
In this two-part tutorial, Ron and Karl playfully guide you along the path of creating a JSR 168-compliant portlet which can be consumed by multiple portals using Web Services for Remote Portlets (WSRP). In part 1, you choose a path for creating the portlet: fork 1, uses the Rational development environment ; fork 2 (for command-line die-hards), uses hand-coding in your favorite editor. You then enable the portlet to access a database using SQL. In part 2 (a future installment), you will make the portlet available to other portals using WSRP. This part will also demonstrate accessing the portlet in a portal running under IBM® WebSphere® Portal V5.1.
- Create a portlet
- Access a database from a portlet using SQL
- Enable the portlet for WSRP
- Access the portlet from a portal which supports WSRP
You should have these basics skills:
- Familiarity with Rational® Application Developer
- Understand portlet development concepts
- Basic Java™ coding skill
You need the following software installed to work through the scenario in this tutorial.
See Product trial downloads for currently available trial software.
- IBM Rational Application Developer for WebSpherer V6, or Rational Software Architect V6
- IBM WebSphere Portal V5.1.x
- IBM WebSphere Application Server 5.1.x
Rational Application Developer and Rational Software Architect both provides wizards for creating JSR168-compliant portlet skeletons. You can fill in the generated portlet skeleton with Java code to perform a specific task. However, some programmers want to know the nitty-gritty; that is, they want to know how you create a JSR 168 portlet if you don't have an IDE. Said another way, they want to know what that IDE is doing, anyway. So, part 1 of this tutorial gives you options. You can either use the tool, or you can hand-code. Either way, you create a portlet which conforms to the JSR 168 specification.
Now, the beauty of writing to standards is that you maximize the possibility of making the portlet available for different portals, which could run under different portal servers. Enter WSRP. By deploying your JSR 168 portlet so that it is consumable as a remote portlet which adheres to WSRP, you make your portlet available to a variety of portals. Part 2 of this tutorial shows you how to do just that. It also demonstrates how to access the portlet you created in part 1, from a portal which runs under WebSphere Portal V5.1 , which just happens to support WSRP.