Wednesday Feb 28, 2007

What is new in JSR 286

If you are familiar with Portlet 1.0 and wants to know what is new in Portlet 2.0, here is a summary of new features. This information is based on first draft available here and may change in final draft.

1. Portlet eventing or Inter Portlet Communication (IPC) - Portlet 1.0 have very limited capability of eventing within same portlet application using application session scope. JSR 286 will allow coordination between different portlets across different portlet applications deployed in same portlet container. A new lifecycle phase called processEvent() has been introduced between processAction() and render() phase. New classes such as EventRequest and EventResponse has been added for this purpose.

2. Shared Render Parameters - This is another addition to enhance coordination among portlets within same portlet application.

3. Shared Session Attributes -  to share user data among different portlets in different portlet applications (in other words, sharing of  data on portal level for a given user)

4. Portlet Filter - Similar to servlet filters, this will allow dynamic interception of requests and responses to transform or use the information contained in the portlet requests or portlet responses. While servlet has only one "Filter" interface, portlet have one "\*Filter" interface corresponding to each lifecycle method of portlet.

5. Resource Serving - Provides the ability for a portlet to serve a resource. A new called RESOURCE_SERVING_PHASE has been added for this purpose.

6. Support for Ajax - Similar to IPC and web framework bridges, the support for Ajax in different implementation of Portlet 1.0 is vendor specific. Portlet 2.0 is trying to make a standard for Ajax support.

7. Serving markup fragements - Portlet 2.0 is trying to provide support for an usecase where a fragement of the markup will be returned by the portlet. This will be helpful in providing support for technologies like AJAX.

8. Alignment with WSRP 2.0 - Web Services for Remote Portlet (WSRP) 2.0 specification from OASIS is also in the draft stage and Porltet 2.0 EG is trying to align these 2 specification.

9. Better support for web frameworks - Portlet 2.0 is trying to provide additional means for creating bridge for web frameworks such as JSF, struts, spring etc. Currently these bridges are proprietary for different portal vendors and Portlet 2.0 is trying to make these bridges portable.

Wednesday Feb 14, 2007

SIP Servlet API

What is SIP : SIP (Session Initiation Protocol) is an IETF standard protocol for IP-communication, enabling IP-Telephony gateways, client endpoints, PBXs and other communication systems or devices to communicate with each other. SIP mainly addresses the call setup and tear down mechanisms of sessions and is independent of the transmission of media streams between caller and callee.

JSR 116: The SIP Servlet API v1.0 is a container based approach (modelled on the HTTP servlet paradigm) to developing communication applications utilizing the Session Initiation Protocol (SIP) protocol.

 SIP Servlet API is based on Java Servlet API and its base servlet javax.servlet.sip.SipServlet extends javax.servlet.GenericServlet class. If we compare SIP with Http servlet, here are some of the differences -

 Servlet Class
javax.servlet.http.HttpServlet  javax.servlet.sip.SipServlet
 Session Class
javax.servlet.http.HttpSession  javax.servlet.sip.SipSession
 Packaging.war file .sar file 
Deployment Descriptor

JSR 289: SIP Servlet API v1.1

Tuesday Feb 13, 2007

JSR 170 - Java API for Content Repository

What is a Content Repository - A content repository is a hierarchical content store with support for structured and unstructured content, full text search, versioning, transactions, observation, and more. It is a generic application "data store" that can be used for storing both text and binary data (images, word processor documents, PDFs, etc.). It can be think of 2 parts - (a) any data store such as RDBMS, XML document or file system and (b) an application to interact with datastore. Information storage and retrieval are 2 most common services provided by any CMS. In addition, they mostly provide advance services like searching, versioning, permissions, locking,  hierarchical organization of items and more. Some of the popular CMS vendor are Documentum, Vignette, or FileNet.
Most visible use of CMS is in the organization's portal to provide information to it's empoyee / customer. 

JSR 170 - In simple terms, JSR 170 is same for CMS what JDBC is for any RDBMS. Earliar, portal application have to use proprietary API provided by CMS implemenatation and their was vendor locking.  JSR-170 tries to solve this problem by standardizing the API that should be used for connecting to any content repository

 Package name for JCR api is javax.jcr

One popular implementation of JSR170 is Apache Jackrabbit, the reference implementation.

What is next -

JEE 6 : JSR170 may be included in the next version of Java Enterprise Edition. 

JSR 283: Content Repository API 2.0  is in progress and will be released in May 2007.

Some references -

What is Java Content Repository?

 JSR-170: What's in it for me?


Friday Feb 09, 2007

DynaFaces : Ajax extension to JSF

 AJAX (Asynchronous JavaScript and XML) is one of the latest revolution in web development circles, delivering rich dynamic interfaces within a normal web browser.

To add Ajax capability in JSF components, a new project called DynaFaces is created at

Here is a good article to get an overview of what Dynamic Faces is all about: New Technologies for Ajax and Web Application Development: Project Dynamic Faces.

Thursday Dec 07, 2006

WSRP milestone 1 screencast available

As mentioned by RajeshT in his WSRP milestone 1 preview release announcement, the screencast for m1 preview release are now available at Open Source WSRP project site.

Screencast 1 - How to download and build open source WSRP project?

Screencast 2 - How to deploy and test  open source WSRP project?

 After m1 preview release, the WSRP trunk has been tagged as "milestone-1-preview". Here is the URL to checkout m1 preview release. This tagging is to align WSRP with the open source Portlet Container project, which is  also  tagged as "milestone-1-preview".  The WSRP "milestone-1-preview" tag will work with portlet container "milestone-1-preview" tag.

 The source of the Milestone 1 preview build of Portlet Container is now available as zip.


Friday Aug 25, 2006

What is new in WSRP 2.0

Here is a small information about WSRP 2.0 specification released last month. In new specification, the number of interfaces remain same but new methods are being added in all the interfaces except "Service Description" interface. Following is a list of new operations as well as extensions added in various interface. The method extensions are shown in italics.

Markup Interface:
    handleEvevnts(...) [Added for Interportlet communication]
    performBlockingInteraction(...) - Extended to return public navigational state and events generated by interaction
Registration Interface :

Portlet Management Interface :
    getPortletDescription(...) - Extended to include events portlet generates and handles, and public navigational state

Service Description Interface :
    getServiceDescription(...) - Extended to include event descriptions and support for optional features (e.g. copy, export, import)

As we can see, Portlet Management interface is the one which is enhanced drastically.

Apart from changes in the interfaces, WSRP2.0 is now a 3 step protocol. An additional step (optional) for distributing events among portlets is being added between performBlockingOperation and getMarkup.

I will write more about WSRP 2.0 soon. Here is the comitee draft, if you want to read more.

Sun's implementation of OASIS WSRP (V1) has been open sourced

See the Rajesh T's blog for more detail.

Monday Jul 31, 2006

TCP and Http tunnel


Recently, while working on one web service client application using JAX-RPC, I found the need to see the SOAP message generated by my application and also the response message received by it. So, I want to use some kind of tunnel to intercept TCP messages generated by JAX-RPC. I searched on net and come to know about TCP Tunnel/Monitor application which comes as part of Apache SOAP. I downloaded it and start using it. After a few try, I found that this tunnel is not able to send the messages to the destination site because my computer is behind http proxy and firewall. I tried to set -Dhttp.proxy and -Dhttp.port java options while starting TCP tunnel but still no luck. I again turned to google and found one http tunnel application. I downloaded http tunnel application and set my TCP tunnel to forward request to this http tunnel. The http tunnel is now being set to direct the request to the web service provider.  This way, I was able to intercept SOAP messages generated and received by my application.

Friday Jul 28, 2006

How to publish JSR 168 portlet as Remote Portlet


Here is an "How to do" article on publishing any JSR 168 porlet as a remote portlet in Sun Java System Portal Server 7.

Tuesday Jul 25, 2006

Efficient way to do things

To find a particular class in all the jars within a folder and its sub folders -

for i in `find . -name "\*.jar"`; do echo $i; jar tvf $i | grep TypeMappingRegistry; done

To find entry of a particular class in all the xml within a folder and its sub folders -

 for i in `find . -name "\*.xml"`; do echo $i; grep qname.jar $i; done > /tmp/out

Tuesday Jul 18, 2006


We usually get NoClassDefFoundError during our development because of some missing jar in the CLASSPATH. Sometime, we even don't know, which jar contains missing class. I am trying to make a list of some of the jars and the class that they contain. To start with...

 Class Name
 Jar Name
 javax.xml.namespace.QName  jax-qname.jar
 javax.xml.namespace.NamespaceContext namespace.jar


I know this jarsearch project at which may be helpful in this situation.

Monday Jul 17, 2006

Hello Portlet

Sometime back, I was writing an article for WSRP and wanted to use a simple, very basic JSR168 HelloWorld portlet to demonstrate the steps involved. After searching the internet, I didn't find any Hello portlet war that I can download and start using it. Finally, I created this  this Hello portlet and publishing it for our friends.

Wednesday Jul 12, 2006

Hello Blogger's World

So, at last I have the courage to start blogging...It is easiest way to become famous in seconds (may be for few seconds).

At Sun, I am working as a development engineer in JES Portal server team (project WSRP). In my blogs, I will try to write what/how/why faq on wsrp and portlet container (JSR168 implementation) of Sun's Portal server.

Please feel free to provide suggestion/feedback.




« July 2016