Learn all about the second version of the Java Portlet Specification (JSR ). In Version , the specification and the APIs more than doubled. The Java Portlet Specification addresses the requirements of aggregation, was approved by the Java Community Process in March as JSR This tutorial on JSR development provides an introduction to portlet programming as the reader is taken through the creation of a simple HelloWorld portlet.

Author: Tolar JoJosho
Country: Burkina Faso
Language: English (Spanish)
Genre: Politics
Published (Last): 3 January 2004
Pages: 183
PDF File Size: 1.22 Mb
ePub File Size: 1.63 Mb
ISBN: 661-8-92200-134-3
Downloads: 99817
Price: Free* [*Free Regsitration Required]
Uploader: Moogugal

First, you provide the general event definition, and then you reference this definition in the portlet section with tags that specify that the psecification can either receive or send this event.

Leveraging these coordination features, portal administrators or business users can now build larger composite applications, out of portlet components without programming.

This specification means that you must set at least an expiration time using response. The portal should provide UI controls that allow the portlet to switch to this mode. Figure 3 depicts an example where a navigator portlet and a content portlet share the same public parameter docid.

Ideally, set the expiration time portlrt a high value so that the markup is cached for a long time. A servlet request listener can distinguish a plain servlet request targeted to a servlet from a wrapped servlet request targeted to a portlet by looking at the request attribute javax.

This is one of the good features.

What’s new in the Java Portlet Specification V2.0 (JSR 286)?

GenericPortlet also lets you use the following annotations to make dispatching life-cycle calls to specific handler code easier:. As a result of not encoding any state of the page and portlets on the page, you cannot count on getting the current portley parameters, portlet mode, or window state in your portlet.


This will help us access portlet from remote location other portals. We can portlet related filters and Listeners in portlet portlet.

Standard portlet API

How would you do this? Note that when you use wrappers, you should stick to ;ortlet wrapper pattern and only override existing behavior. But we have many elegant web application frameworks. If you want to provide the portlet with additional capabilities, set an object providing access to these capabilities as a request attribute. Subscribe To Posts Atom. The expert group of JSR worked to make JSR extensible so that you can add features and functionality in our frameworks on top of JSR in a noninvasive and container-independent manner.

You now need to include the new tag library with: Keep in mind that because of the missing state information, you are restricted in the output of serveResource: Portlet Specification, Version 1. After doing its preprocessing, the filter implementation can either terminate the request processing or call the next element in the filter chain, passing portpet either the received request and response or additional wrappers.

Web content structure 1 velocity templates 1 vm varibles 1 wcm 1 web application 1 web applications 1 web content display 1 web content email forms 1 web content froms 1 web content structures 1 web content template 1 web content templates 1 web content specificatiln pdf 1 web content velocity variables 1 web content workflow 1 web server 1 web service invoker 1 wedeploy 1 workflow definition xml 1 workflow designer 1 xhtml 1 xpath 1 yahoo news 1 yahoo stocks 1 yahoo weather 1 yql 1 yui 1.

You receive these parameters in the serveResource call.

Java Portlet Specification – Wikipedia

This limitation had some disadvantages:. This method gives a hint to the portal about how much information the target serveResource call requires. As we have seen, JSR provides you with the means to serve resources directly using the portlet.


This will add advantage to perform some events or some actions before portlet is rendered. How can the portlet get access to these public render parameters? We can also call Portlet Specification 2. You can view these poortlet render parameters as a shared storage area where all participating portlets can set and get the values. Note that public render parameters can be stored in the URL, as in the WebSphere Portal implementation, and thus you can bookmark pages and use the browser’s Back and Forward buttons.

Standard portlet API

This restriction was done because portlets are aggregated on a page and all concepts that assume that you are the only component on the page are not easily applied to the portlet programming model. Most specificatikn API objects, for example, portlet session or portlet preferences, do implicit namespacing, but you need to do explicit namespacing when you access shared data stores or want to assign unique IDs to output elements.

Using cookies You can set cookies at the response of each life-cycle method processAction, processEvent, render, and serveResource with this code: Thus, you can issue XmlHttpRequests to ResourceURLs and, on the server side, get complete access to the portlet context such as render parameter, portlet mode, window state, portlet preferences, and portlet session.

Generic Portlet Development using Liferay Plugins