Friday Jun 04, 2010

My Last day @ Sun

After 6 years in Sun, now I am leaving Sun to pursue another career opportunity outside Sun. So I am saying good bye to my sun blog and you can now find me blogging at

Monday Aug 13, 2007

New Feature: Resource Serving in JSR 286

Recently the JSR 286 draft was available for public review which can be downloaded from this link. It includes some of the major features which were missed in the JSR 168 spec. You can visit Deepak's blog  to  get a list  of  all those major changes.  One of the major feature introduced  in this  new Portlet  specification is "Resource Serving"  .  In this blog I will  explain  this  feature in detail.

In one line "The resource serving feature provides the ability for a portlet to serve a resource".

[Read More]

Tuesday May 29, 2007

Portal Pack 2.0 preview for NetBeans 6 M9

The Portal Pack 2.0 preview is now available for download here. Though in this version there are no functional changes in the serverplugin modules, but there are some changes in the portlet builder (Generic Portlets) module. Unlike earlier version, in this version of the Portal Pack, there is no separate "Portlet Application" project type. In this version Portlet application is supported through web framework. So  "Portlet Support" can be added to a new/existing web application  through web framework. In other word you can say an existing/new web application can be extended to support Portlets inside it. To know how to create portlet application in this version click here

Thursday May 17, 2007

InterPortlet Communication Made Easy with IPC Story Board in the Portal Pack Plug-ins for NetBeans

In my last blog, I had mentioned about the IPC Story Board which is an upcoming feature in the next version of the Portal Pack. In brief IPC Story Board in Portal Pack will help developers to implement Inter Portlet Communication/Eventing in their portlets in a visual manner.  More importantly it also generates most of the eventing related code automatically for you. In my last demo I had also linked to a screen cast which gives an idea how this IPC Story Board will work in future. But now there is a new flash demo available which shows a full functional IPC Story Board in action. This feature will be supported in the next version of the Portal Pack for NetBeans 5.5/5.5.1. The new binaries are not yet available on the Portal Pack project site, but those will be available very soon. In this flash demo I have created a simple shopping cart portlet application using Portal Pack + NetBeans 5.5 with IPC Story Board support. The application developed using IPC Story Board can be deployed/run on Open Portal Portlet Container / Sun Java System Portal Server 7.x . The future version of the IPC Story Board will also be supporting  JSR-286 portlet eventing.

If you are interested to see the fully functional IPC Story Board in action then check this screencast

Let me know if you have any suggestions & feedbacks or you want to see any new features in the Portal Pack. 


Monday May 07, 2007

Upcoming Feature in Portal Pack - IPC Story board for Eventing to visually wire the portlets

Now a days I am working on some new features for Portal Pack. One of the features I am working on is "IPC Story Board"  for Eventing. Portal Pack IPC Story board will be useful for all portlet developers who want to make their portlets consume events thrown by other portlets. Though  eventing is not part of the current portlet specification, but it will be part of the next portlet specification. IPC Story board will be providing drag and drop support where the developers will be able to drag and drop their portlets and then visually wire them with each other. If you want to see an early preview of IPC Story board in the Portal Pack then check this small flash demo

Wednesday Mar 14, 2007

Portal Pack 1.1 (NetBeans Portlet Plug-ins) Plug-ins are now available with Java EE 5 Tools Bundle Update 3 Preview

The Portal Pack 1.1 Plug-ins (NetBeans Portlet Plug-in) are now available in the Java EE 5 Tools Bundle Update 3 Preview. The Java EE 5 Tools Bundle is a complete,developer-friendly environment with all necessary runtimes installed
and fully configured to start portlet application development.

The Java EE 5 Tools Bundle includes following fully configured and ready to use components for Portlet Application development:

Detail list of components in Java EE 5  Tools bundle  can be found here. Check Deepak's blog to know more about Portlet Container 1.0 .

Note: Incase you are already using Portal Pack Plug-ins in your NetBeans IDE, you can update to the latest version of Portal Pack plug-ins.The latest version of the Portal Pack  plug-ins are available for download here.

Some highlights of this release are

  • Supports all features supported by Portal Pack 1.0.
  • Some critical bug fixes.
  • Supports to create a new Portlet Application from existing sources.

Here are the links to the resources and docs for Portal Pack 1.1 Plug-ins (Netbeans Portlet Plugin)

Wednesday Feb 21, 2007

Portal Pack Plug-ins are now also available at NetBeans Auto-Update Center Beta

Portal Pack Portlet Plugins are now also available at NetBeans Auto Update Center Beta. To install/update latest version of these plugins 

> Go to Tools > Update Center menu of NetBeans 5.5 IDE

> Select "NetBeans Auto Update Center Beta" check box in the list of update centers

> Click Next

The following modules of Portal Pack are required for Portlet Development support in NetBeans IDE

  • Generic Portlets - This module provides wizard based supports to create JSR 168 based portlet applications.
  • OpenSource PC - This module provides support to deploy/undeploy portlet applications on Portlet Container available on or bundled with Java EE SDK
  • Sun Java System Portal Server 7.x - This module provides support to deploy/undeploy portlet application on Sun Java System Portal Server 7.x
  • Base PSFramework - This is a library module which is required for the above two server plug-ins modules.

The same modules are also available as a zip archive at

Saturday Feb 17, 2007

Updated Flash Demos for Portal Pack Plug-ins

Check out updated Portal Pack flash demos at

These flash movies show all the new features supported by Portal Pack plug-ins for Sun Java Systems Portal Server 7.x

Friday Dec 15, 2006

NetBeans Portlet Plugin 1.0 for "Portlet Container 1.0 Beta"

The NetBeans Portlet Plugin  is now available for download which  includes a plugin for the Portlet Container 1.0 Beta component bundled with the Java Application Platform SDK Update 2 release. Read about Java Application Platform SDK Update2 release here. To download the Java Application Platform SDK Update 2 click here.

Portlet Container 1.0 Beta, an Enterprise Class Portlet Container implementation is derived from the open source project on

As a plugin for NetBeans IDE 5.5 and above, current release of NetBeans Portlet Plugin helps developers to develop, deploy and test portlets on the Portlet Container 1.0 Beta component that is part of the Java Application Platform SDK U2 from their NetBeans IDE. NetBeans Portlet Plugin makes portlet development as easy as writing a normal Java application, with all the features of portlets made available to you at the click of a mouse.

Some highlights of this plugin are

  • Provides wizard based support to create a JSR-168 based generic portlet application.

  • Generates deployment descriptor automatically.

  • Provides support to specify different portlet modes while a new portlet  is added.

  • Portlet deployment/undeployment support on the Portlet Container 1.0 Beta component.

  • Provides support to view output of a single portlet

  • Provides support to launch admin tool directly from NetBeans IDE.

  • Provides support to start and stop Portlet Container 1.0 Beta from NetBeans IDE.

Here are the links to the resources and docs for Netbeans Portlet Plugin

Visit the NetBeans Portlet Plugin home page for future releases and announcements.


Tuesday Nov 07, 2006

PortalPack portlet plugin for Netbeans, Flash Demo is Now Available On

A new open source project called "portalpack" has been created on As a plugin to Netbeans IDE 5.5 and above, this module will provide full portlet developement life cycle inside Netbeans IDE. Now portlet developer can develope, deploy and test their portlet application inside Netbeans IDE. Initially it will support Sun Java System Portal Server 7.x and Sun Open Source Portlet Container. Check out online flash demo at to findout various features of new portalpack plugin. Downloadable binaries and sources for this plugin will be added very soon to

Wednesday Oct 25, 2006

Blog on jMaki widgets, jMaki Events and their usage in portlet environment

Recently I was trying to use "jMaki" for some demo application. I found it quite simple and useful. For those who are not aware of "jMaki", here's a brief description about the project "jMaki"

"jMaki is an opensource project in It is a framework that provides a standard way for designing or creating reusable AJAX-enabled widgets and the services needed to back those widgets. The framework includes a simple widget API that you can use to create new widgets or wrap existing widgets from widget libraries such as those from Dojo, Yahoo UI Widgets, Google, Abobe Spry, or Scriptaculous."

The current version of jMaki has some widgets which are wrapper of ajax libraries like Google Map, Yahoo Geocoder, Dojo clock and Dojo editor etc. You can use those widgets in your web application easily using jmaki api. There is a Netbeans plugin for jmaki available on This plugin can be used for automatic code generation by doing just drag and drop of widgets.
If you want to try jmaki quickly then try this plugin.

Before adding any widgets to your jsp page, you have to add a taglib declaration at the top of your jsp. Here's the code for the taglib declaration

<%@ taglib prefix="a" uri="" %>

Here's the sample code to show a yahoo calendar in your jsp. Just add this below line in your jsp and you will be able to see a yahoo calendar in your jsp page.

For flickr Search add


Event handling is the best thing I like most in jmaki. jmaki provides api for handling events between multiple different widgets. It follows the subscriber/publisher model to handle events. And the best part is it's totally a client side api and the eventing works totally in client side through java script. So it's fast and doesn't have any serverside dependency. So if you have multiple widgets in a page and if you want to make those widgets to interact with each other without any code dependency, then you can make a widget to publish an event so that all subscribed widgets can listen that event and acts appropriately. Let me explain how it actually works.

A widget can publish an event just by using publish() in jmaki javascript api. Usually widget publishes to a topic with a particular name. The widgetA can publish a event by adding the following code

jmaki.publish("topicA", response.someobject);

where topicA is the topic name.

Now all other interested widgets can subscribe to this topicA to listen the event. This can be done by the following code

jmaki.subscribe("topicA", listener);

where "listener" is a javascript function which is called whenever a widget A publishes an event on topicA.

So if you have three widgets in a jsp page let's say widgetA, widgetB, widgetC. And widgetB and widgetC work depending on the state of the widgetA. Then widgetA can publishes a event whenever it's state changed and widgetB,widgetC can listen that events and works appropriately.

I also tried to use these jmaki widgets in portlet environment inside portlets. It worked after a few customization steps. Also the eventing things worked between multiple portlets where each portlet contains a different widget.
I will post the steps to use jmaki in portlet enviroment in a separate blog soon.

Here's the link for jmaki home page

Tuesday Oct 17, 2006

Bundle your application in to a Single Jar file

Recently I had a requirement where I needed to bundle my application in to a single jar file. Here single jar file means to bundle everything (including util jars) into a single jar file, so that any one can run that jar file by “java –jar “ option or using other options. Bundling application into single jar file also makes the distribution process easier. Initially I was thinking it’s not a big deal and just setting the classpath in jar’s manifest file would be fine.

Here’s required structure of the jar file

- single.jar

   ---- util1.jar
   ---- util2.jar


Then I added a classpath entry in manifest for all utility jars. But that didn’t work. After some googling I came to know that classpath mentioned in the manifest is checked and loaded from file system not from the content of the jar. So the class loader checks for util1.jar and util2.jar inside util directory in the filesystem not inside the jar. So we can’t solve this problem by mentioning the class path in manifest.

As I didn’t have any solution for it, after some google search I found an open source tool “one-jar” which actually describes how to load utility jars inside main jar file. In brief One-JAR uses a custom classloader called JarClassLoader to load information from the single jar file and it has it’s classes to control bootstrap process. If you are interested to know how it works, then here is the link

Monday Jul 17, 2006

Mastering EJB 3.0

Are you interested to know about EJB 3.0 ? A free PDF of Mastering EJB 3.0 is available on Check this link to download the PDF

Friday Jul 14, 2006

Want to write Ajax based application !!!

   As ajax is getting more and more popular. Everybody wants to make their web applications ajax enabled. So in my first blog I decided to start with ajax.
So let's first start with what is ajax ?

Ajax stands for “Asynchronous JavaScript And XML”. The punch line behind ajax is lazy loading. Further to explore this point, whenever a web page is accessed, browser loads the whole page before showing it to user. Now let's say for a web application where you want to update some section of the web page frequently, but not the whole page. But using traditional web page design you cannot do this as everytime you want to update a section in web page, the whole web page needs to be loaded.
Using Ajax the whole web page is not required to be loaded again and again. Only the dynamic section gets loaded which gives a flicker free experience to end user and it's faster as only the changed data are transferred from server to client not the whole html page.
Let's say you want to add a stock ticker in your web site. So you need to add a ajax component for stock ticker in your webpage which will be updated automatically by getting data from server without loading your web page again and again. Let's talk about a live cricket score card webpage where the webpage gets refreshed in a particular time interval. So by using ajax you can only change the necessary data like score and balls without updating the whole web page.
There are some very interesting ajax applications available now like Google Map, Google mail and also yahoo mail beta. Check yahoo mail beta which is a ajax version of yahoo mail. You will get a feeling of thunderbird/outlook express though the beta is little slow. And also if you have not yet checked google pages and google spreadsheet, check them now. I was really amazed when I saw google spreadsheet. It's like you are using MS excel in browser. Isn't it cool.

As everybody wants to use ajax for their website, now the biggest challenge is the development of ajax based web applications. As you know ajax is a client side feature of a web application. So to enable ajax in your web application you need to do some client side programming. Now the client side programming is typically javascript programming. So tell me how many java programmers want to do javascript programming. Javascripts are very good thing for client side validation and for some cool stuff in client side. But as a java programmer ( I don't know about others java programmers) I am used to object-oriented programming and don't like to play around javascript, may be I find little hard to program javascript :) .
So as writing a complex ajax application requires a lot of javascript programming, we needs some kind of frameworks to write ajax applications. As you know framework does most of the common tasks and it helps developer not to worry about common tasks and helps to develop application rapidly.

There are some ajax framework freely available now. You can check for some of the ajax frameworks available in the market. I had tried JSPControl Tag library ( one of the ajax framework. And surprisingly within 15 min I wrote my first ajax based application which requires a very minimal javascript programming. Do check it if you want.




« February 2017