ULC Portlet Integration
Since UltraLightClient 6.0 the two special functions pause and resume
are available, which enable stopping and restarting a user session. This
capability can be used to deploy UltraLightClient-based applications as
portlets according to the Java Specification Request (JSR) 168.
Portlets as defined by JSR 168 are an emerging standard to develop web
portals. This new standard poses a challenge for rich client
technologies. The issue is that the portal server reloads the entire
browser page whenever a server roundtrip occurs. This means that
portlets must be able to save and refresh the state of their UI, which
is virtually impossible for rich clients that maintain their state on
the client side. Since UltraLightClient has a server-side representation
of the UI state, it fits much better into the portal server
architecture. Given the new functions pause and resume, any application
can now be deployed as a portlet. This contribution shows how it can be
On the client side, The UltraLightClient portlet will be displayed in an
applet. Applets are discarded and restarted when a browser page is
reloaded. By calling "pause" when the applet is discarded and "resume"
after it has been restarted, the UI status survives the server
roundtrip. As shown below, doing this is really simple. Moreover, it is
not dependent on a particular portal server. The example given here uses
the Jetspeed portal server, but the same code would work with the
WebSphere portal server or any other product that is compliant with JSR
- This contribution is a showcase for the integration of a ULC
applet inside a portlet which runs in a JSR 168 compliant portal
- The portlet deployment is implemented in a special launcher.
The application shown as an example is the ULC set application that
comes as a sample of the release and is one of the online demo
applications. If you want to deploy a different application, you have
to adjust the class 'ULCSetPortlet' according to your needs.
- The UI status of the UltraLightClient application will be
saved and restored whenever the portal page is reloaded, or when one of
the portlets is maximized or restored after maximizing.
How To Use
- Change the status of the UltraLightClient portlet.
- After that, maximize it. As a consequence, you should see the
changes you made in the previous step.
- Leave the portlet, e.g. by maximizing another portlet. Once
you return to the UltraLightClient portlet, you should see all your
How it is implemented
The core of the portlet integration is the adaption of
UltraLightClient's lifecycle. By introducing the pause and resume
functions, the UI session state can now be preserved on the server side
when the client is being discarded. Since UltraLightClient maintains the
UI state on the server-side anyway, introducing this functionality was
- In the current implementation the UltraLightClient application
is never stopped explicitly. The application will be removed when the
server timeout expires.
- If an UltraLightClient portlet is not visible it will be
removed after the session timeout. For the sample application the
default timeout has been increased in web.xml.
How to deploy
- Install a portal server of your choice or Jetspeed to use the
pre-configured psml file.
- Place the war file in the Jetspeed/WEB-INF/deploy folder, from
where it will be deployed by Jetspeed.
- Setup the UltraLightClient portlet. To deploy in Jetspeed
adapt the default-page.psml file.
Note: editing the psml file without changing the fragment id appears to
have no effect. We assume that this is a bug in the preliminary version
being used here.