Sun Java Solaris Communities My SDN Account Join SDN
 
Article

Building IPC Portlets for Sun Java System Portal Server 7 With Sun Java Studio Creator 2

 
By Ed Chen and Marina Sum, June 15, 2006  

[Part 1] [Part 2] [Part 3]

With portlets that support Interportlet Communication (IPC), you can make them aware of each other's behavior and display content consistently. This article describes how to create an IPC portlet for Sun Java System Portal Server 7 (henceforth, Portal Server) with the Sun Java Studio Creator 2 IDE (henceforth, Java Studio Creator). The portlet can subscribe to all IPC events and display the events in a table.

An appendix at the end of this article shows you how to deploy an IPC portlet to Sun Java System Web Server 6.1 (henceforth, Web Server).

Contents
 
Installing Portal Server and Java Studio Creator
Displaying Sample IPC Portlets
Creating an IPC Portlet With Java Studio Creator
Deploying the Portlet
Appendix: Deploying on Sun Java SystemWeb Server 6.1
References
 
Installing Portal Server and Java Studio Creator

First, install Portal Server and Java Studio Creator:

  1. Download and install Portal Server 7.

  2. Download and install Java Studio Creator.
Displaying Sample IPC Portlets

Portal Server includes sample IPC portlets that demonstrate the use of IPC techniques. To see those portlets in action:

  1. Log in to the Portal Server desktop at http://hostname:portnumber/portal/dt.

    A welcome page is displayed. See Figure 1.

    Figure 1: Portal Server Welcome Page
    Figure 1: Portal Server Welcome Page
     
  2. Click Developer Sample under SAMPLES. At the login page, type developer in both the user name and password fields.

    The developer sample portal is displayed. See Figure 2.

    Figure 2: Developer Sample Portal
    Figure 2: Developer Sample Portal
     
  3. Click the Interportlet Communication tab.

    All the IPC portlets in this sample are displayed. See Figure 3.

    Figure 3: IPC Portlets in Developer Sample
    Figure 3: IPC Portlets in Developer Sample
     

Now try out the portlets and observe their behavior. For example, type 345 in the text field under PricePortlet and click OK. After the page refreshes, click OK in SearchPortlet to trigger IPC messaging events between the portlets. The portlets then display a desktop similar to that in Figure 4.

Figure 4: Desktop After Triggering of IPC Messaging Events
Figure 4: Desktop After Triggering of IPC Messaging Events
 

[Part 1] [Part 2] [Part 3]

The Portal Post
 
Ed ChenEd Chen, a staff engineer for Sun Java System Portal Server, enjoys Java programming, reading, and watching "Deal or No Deal."
 
Marina SumMarina Sum is a staff writer for Sun Developer Network. She has been writing for Sun since 1989, mostly in the technical arena. Marina blogs on Sun products, technologies, events, and publications.