Wednesday, December 31, 2003

JLCP Trying Portlet

I found following news on -

We have begun initial investigations into separating out the various modules of JLCP into independant units. During this research, we will be looking at how we can change JLCP to support the adding of new JLCP specific modules and also standard portlets. Hopefully this will yield some code which allows the current JLCP modules to act as Portlets in a standard portlet container.

In addition, the initial cut of the photo gallery is finished and should be deployed at the beginning of the week.

I hope jlcp will be another feather in the cap of portets especially when there are not too many successful projects available on portlet technology.

Portletizing Existing Applications

Someone asked on Portlet Discussion Group about how to integregrate existing application using portlets. It is called portletizing application. Here are few of my tips. There are various ways to do it -

1. Put the entire application in one portlet. There are various ways to do this. But the easiest is to use iFrame.
2. Put the entire application into two portlets. Use one portlet as navigation/ menu and other work work-area. It will be a outlook like way. There are few issues associated with it. iFrame can be used in work-area portlet.
3. Task or Operation based portlets. Per portlet will do a specific task like "pay statement" or "emergency contact" etc. But it is nearly redesign of an application. Advantages of existing portlets and JCA connectors can be taken.

As I mentioned above, there are various ways to do this aggregation. But the best way takes the most time i.e. 3rd one. There are pros and cons of different approaches.

I hope it will be useful.

Tuesday, December 30, 2003

JSR 168 vrs. IBM Portlet API

Here I found a very good article on comparison between JSR 168 and IBM Portlet API. It is going to be must-read by IBM Portlet developers, as sooner or later, IBM API is going to be replaced by JSR 168. The document is written on 17th December so it is relatively newer one. Thanks Hepper, but a little more detail would be great.

Comparing the JSR 168 Java Portlet Specification with the IBM Portlet API

Wednesday, December 24, 2003

eXo platform is JSR 168

Yesterday Benjamin informed me on my group that eXo is now JSR 168 compliant. I wish him and his product a big success.

I am planning to write about it in detail. But for now you can visit for more details. You can also visit the homepage of eXo Platform.

Tuesday, December 23, 2003

Few More Portlet Links and Resources

Here I found some more links related to portlets.
Click here.

Sharing Session Among Portlets

IBM WebSphere Portal Server way
Put these lines for each portlet in web.xml file.


JSR 168 way
In the JSR 168 spec the <init-param> does not exist So to share attribut among portlets two scopes from the PortletSession object can be used :

and use portletSession.setAttibute(attName, attValue, scope)
with thanks to Benjamin Mestrallet of 'eXo' fame

Monday, December 22, 2003

(funny) Portlet-my first impression

My first impression was that it was a fat SERVlet, cousin to MIDlets
and bastard offspring of APPlets.

- taken from "" newsgroup

Struts 2.0 as Portlet Framework

A huge Struts 2.0 discussion on the struts-dev list has started. Everybody is putting in their ideas of how Struts 2.0 ought to be like. I encourage all Portal/Portlet developers to participate in that discussion in struts-dev and provide their insight on how Struts 2.0 could become a good portlet framework.

Saturday, December 20, 2003

Javascript Remote Scripting (JSRS) for Portlets

I am always troubled by the frequent page refreshes of Portlets. Any person with average speed connection can understand this problem. You are minimizing one portlet, whole the data will be posted to server and page will refresh :( . Few Portal Server vendors have tried to understand problem by implementing some client side scripting.

Client Side scripting with Portlets is in-itself is a subject of huge discussion. As on date, Portlets do not support client side scripts like JavaScript very well.

Imagine a case where you have coded a portlet with a link, whenever you will click on the link, one window will pop up. You have coded the link & window and now going to click on that link.... .... you clicked ...... . and ........ Alas!!!! ..... the windows opened up in some other portlet :(

Portlet vendors don't have any answer of such problems.

The problem becomes worse when some of your portlet want to fetch data from the server. What will happen? You know, whole of the page will refresh!!!!!. There is no way to refresh only a single portlet.

For good old JavaScript/JSP, there are few technologies. First is JavaScript Remote Scripting and other one is Microsoft Remote Scripting. The people who understand these technology know very well, how useful are these technology.


Anyway, If you are happy with your JSP/ Servlets and want to utilize the power of JavaScript Remote Scripting, go to their Home page and know more.

Wednesday, December 17, 2003

Build and implement a single sign-on solution

IBM says that their portal server supports single sign-on. But going through the below given article from IBM, it seems that we need to use separate API to implement single sign-on. It is very strange and I am not able to find-out what level of SSO support exists in IBM Portal. What I concluded is – IBM Portal supports single sign-on for their internal purpose only. For example if you switch form portal view to content publisher view you will not asked for authorization but it will not be the case with custom applications. In other word SSO is supported for IBM applications only, for your own applications you will have to write SSO logic with some (probably open source) API.

So if you are planning to integrate few independent applications and thinking that the IBM single-on will work automatically for you, forget it.

Build and implement a single sign-on solution

Monday, December 15, 2003

Finally RSS Feed

I have created one more blog which will contain all my portlets related study, my OOA/D study and my astrology study. What more is you can also get RSS feed. The link is Portlets Development. You will find most of the information there too.

Portlets - Few More Articles (Jetspeed)

I found few more portlets/ portals related links and articles here. Most of the articles are Jetspeed (and somewhat IMB Portal) related.

Thursday, December 11, 2003

RSS feed for this website

Hello Friends,

I am getting several requests to add RSS feed for this blog. At present RSS feed is not supported on But I just come to know that Awasu (A RSS reader) supports reading ports from yahoogroups so you can get the feed at least from group.


Punit Pandey

Tuesday, December 09, 2003

Portlet Development Best Practices and Coding Guidelines

Essential guidelines
Your portlet code must meet these minimum guidelines to ensure portlet quality.
A.1. Refrain from using instance variables.
A.2. Pass data to the view (JSP) as a bean in the request object.
A.7. Follow Struts design guidelines for Struts portlets.
B.1. JSPs should contain HTML fragments only.
B.2. Design view to fit on a page with other portlets.
B.4. Use portlet style classes instead of specific style-oriented attributes.
B.6. URIs, HTML element name attributes, and JavaScript resources must be namespace encoded.
D.1.Use portlet settings to store user-independent configuration data.
D.2. Use portlet data to store user-dependent configuration data.
D.3. Use servlet configuration for storing static initialization information for a portlet.
E.1. Limit the use of the portlet session for storing portlet state information.
E.2. Do not rely on portlet sessions if the portlet is to allow anonymous access.
E.3. Always request an existing portlet session.
E.4. Prevent temporary sessions from being generated in the JSP.
F.3. Use the preferred language of the requester to look up resource bundles.
G.2 Avoid the use the HttpSession to share data with other portlets/servlets.
H.1. For WML output, keep view between 4 and 5 decks.
I.1. Do not spawn threads.
I.2. Do not use threads to access J2EE resources.
I.4. Avoid synchronized methods.
I.5. Avoid long-running loops.
J.1. Use the Credential Vault to store sensitive data.
J.2. Be careful of what data is passed to the client.
K. For portlets that can be viewed offline:
. 1. Do not use PortletActions.
. 2. Specify explicit support for the PDA markup.
. 3. Avoid the use of potentially harmful action buttons.
. 4.a. Do not use cascading forms.
. 4.b. Avoid the use of dynamic lists of links.
L. Provide documentation for the administrator, including:
. 1. All context parameters and configuration parameters.
. 2. How the portlet uses caching.
. 3. Portlet session requirements.
. 4. Portlet messaging requirements.
. 5. The portlet’s use of the portal user profile.
Important guidelines
Your portlet code should meet these guidelines to ensure portlet quality. There might be circumstances where you would deviate from these guidelines for provide better erformance, reliability, or a better end user experience. In this case, you should document your justifications for deviating from these guidelines.
A.3. Use the portlet logging facility.
A.4. Adopt good code documentation habits.
A.5. Use the ContentAccessService to fetch external content, when necessary.
A.6. Cache portlet settings or portlet data.
B.5. Pages should be fully accessible.
B.7. Minimize dependencies on JavaScript.
B.8. Do not use pop-ups.
B.10. Use IFRAMEs with caution.
F.1. All portlet strings should be fetched from resource bundles.
F.2. All view JSPs should be language-independent.
F.4. Enable bi-directional support for text and images.
F.5. Organize portlet help files by language.
F.6. Be sensitive to cultural-specific formatting.
H.2. Fit the content to the device’s viewing area.
H.3. Eliminate unnecessary clutter.
I.3. Limit temporary storage.
I.6. Use JSPs instead of XML/XSLT.
I.7. Use caching as much as possible.
J.3. Enable single sign-on as appropriate.
Beneficial guidelines
Your portlet code would benefit from following these guidelines. However, they are not required.
B.3. Use Java style comments instead of HTML style.
B.9. Use taglibs whenever possible.
C.1. Make common functions available externally to portlets.
C.2. Combine portlets with similar functions into a single portlet with multiple
configuration settings.
G.1. Use portlet messaging to communicate (send messages) to other portlets on the
same page.
G.3. Use Click-to-Action to quickly enable inter-portlet communication.
H.4. Put links at the end of the document.

I have taken it from IBM. You can download complete document from here

Introduction to JSR 168 - The Portlet Specification

Introduction to JSR 168 - The Portlet Specification : By Sun

Thursday, December 04, 2003


Hello Friends,

Now a days, I am working with IBM Portal Server. So you will find most of the information here relevent only for IBM Portal. Anyway, I'll keep posting other portals related information too as and when possible.

Punit Pandey

Sharing session and other portlet messeging related discussion

Sharing session and other portlet messeging related discussion

FAQs on IBM Portal & Portlets

Meet the Experts: Ron Lynn on portlets: "place"

Tuesday, December 02, 2003

The case of portlets

Are you also puzzled like many others what are the uses of portlets, when to use portlets etc.? Then click here for some discussion.

Refer Me

Do you like this site? Tell a friend!


[ Get your own FREE referral system! ]

Monday, December 01, 2003

Converting exisitng application to portlets

I would recommend you to call your jsp application from an iframe
portlet. You just need to install the iframe portlet and edit it with the
URL of your jsp app.

Use iframe portlets supplied with IBM Portal Server. Jetspeed pageportlet can also be used.

The example of IFRAME Portlet is as follows -

<%@ page session="false" contentType="text/html"%>

<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portlet" %>





{ %>

<script type="text/javascript">

var initialUri =

"<portlet:settingsAttribute name='initial.uri'/>"; // sets initial uri

var frameWidth =

"<portlet:settingsAttribute name='frame.width'/>"; // sets frame width

var frameHeight =

"<portlet:settingsAttribute name='frame.height'/>"; // sets frame height

var frameName =

"<portlet:settingsAttribute name=''/>"; // sets frame name


name="+frameName+" src="+initialUri+" frameborder=0 height="+frameHeight+"


// message to be displayed by browser that

does not support iframes

var noIFrameSupportMessage = "<div

class='wpsPortletSmText'>To launch this application in a new window,

please click Login: <a href=" +initialUri+"





<% }

else { %>

<script type="text/javascript">

var initialUri =

"<portlet:settingsAttribute name='initial.uri'/>"; // sets initial uri

var frameWidth =

"<portlet:settingsAttribute name='frame.width'/>"; // sets frame width

var frameHeight =

"<portlet:settingsAttribute name='frame.height'/>"; // sets frame height

var frameName =

"<portlet:settingsAttribute name=''/>"; // sets frame name

var noIFrameSupportMessage = "<div

class='wpsPortletSmText'>To launch this application in a new window,

please click Login: <a href=" +initialUri+"




<% } %>

Sample, modify as you will. You can use the JSPPortlet to call out to the jsp page.

You can get more detail of IFRAME related to Portlets from - Search IFRAME in deja

"Converting an existing application to a portlet" section of this article can also help.

Please let me know about more resources on this subject.
You will find other techniques like wrapping and Native portlets in the article.

Note: Most of the ideas are IBM Portal Server compatible. But I guess, it must work on other servers too.

Thursday, November 27, 2003

IBM Portal Links & Resources

Hello Friends,

I found a page having extnesive list of links related to IBM portal. Here it is -

Punit Pandey

Friday, November 21, 2003

Java Open Source Server Products

Hello Friends,

Here you will find list of some popular open source portal products -

JA-SIG uPortal
Redhat Portal Server
Jakarta Jetspeed
Gluecode Portal Foundation Server
Cocoon Portal Framework

For brief of above products please visit -

Portlets USENET Groups

As we all know that newsgroups are still best discussion medium on Internet. I was searching for portlets related discussion and found following two (one from IBM and other from BEA) -

GROUP ADDRESS: weblogic.developer.interest.portal


I hope it will be useful.

Thursday, November 13, 2003

Some cool articles

Applying the State Pattern to WebSphere Portal Portlets -- Part 1 Overview

Applying the State Pattern to WebSphere Portal Portlets -- Part 2 Implementation

Create your own portlet and Web service

IBM Portal Server Resources

The case for portlets

WebSphere Portal Programming Pervasive Portlet Development

WebSphere Portal Server programming Portlet application programming, Part 1

WebSphere Portal programming Portlet application programming, Part 2

Wednesday, November 12, 2003

Please note the URL of POST (Portlet Open Source Trading Site) jointly formed by Plumtree, documentum, bea, and Sun.

I wish, IBM would be there too.

FAQs Says as follows -

What are the new JSR 168 and WSRP portal standards?
To help our customers create a better user experience while trimming their integration and customization costs, leading software vendors can help ensure portlets use open portal standards such as JSR 168 and WSRP.

JSR 168, developed by the Java Community Process and formally approved, was created to establish a standard portlet application programming interface (API) to ensure interoperability among portals, portlets, applications and other content sources.

Java Specification Request 168 (JSR 168), has been developed and governed by the Java Community Process (JCP) standards committee
Approved October 2003
Java only – backed by all portal vendors, BEA, IBM, SUN, Plumtree to name a few
All portal vendors will release standard compliant product by the end of 2003 or during the first half of 2004.
WSRP, created by the Organization for the Advancement of Structured Information Standards (OASIS), is a Web Services standard that allows the integration of remote content and applications into portals.

Web Services Remote Portlets (WSRP), has been developed and governed by the OASIS standards committee
Approved, WSRP v1.0, September 2003
Web services standard which supports any language and is also backed by all major vendors
A more radical approach, which is more immature and needs to be refined. Slow uptake.

What is the open source site POST and why is Documentum, BEA, SUN and Plumtree creating and launching this site?
Documentum, BEA Systems, SUN Microsystems and Plumtree are working together to support the freedom to build standards-based application components that can be assembled within any portal. The POST (Portlet Open Source Trading site) provides a forum to help customers develop portlets and components based on the new JSR 168 and WSRP portal standards.

POST is found at

If you do not have IBM portal server client installation on your
systems and still you want to dive into portlet development and
deployment, then herezzzz how u do it ...

Install the latest version of Jetspeed (Freeware ...geeze :-0)

The IBM portlet API is fully based on the open source API

In case you have any probs in installation... Knock my door .!!

Cheers 'n happy portLetting