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: Kigashura Mazragore
Country: Romania
Language: English (Spanish)
Genre: Sex
Published (Last): 13 November 2009
Pages: 26
PDF File Size: 9.9 Mb
ePub File Size: 17.16 Mb
ISBN: 349-9-72909-842-9
Downloads: 17709
Price: Free* [*Free Regsitration Required]
Uploader: Guhn

This attribute is set on a request targeted to a portlet, indicating the current portlet life-cycle phase of this request. At runtime, a filter chain of all the filters is applied to the portlet. Portet new in the Java Portlet Specification V2. 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.

Event based mechanism way to communicate between portlet which are in same or in other page too. By using this site, you agree to the Terms of Use and Privacy Policy. There are many open source and commercial Portlets Catalog available specigication JSR based solutions are rare.

These remote portlets may not be written in Java, and so we need a more general mechanism than the Java serialization. This enhancement means that you can use render parameters so that users can navigate between different views in a shared cacheable portlet while the output still remains cached. In the portlet itself, you access the public render parameters with the same methods that are used to handle ordinary render parameters defined in version 1. The specification specitication the APIs more than doubled compared to version 1.

Types of portlet solution vertical domains and technology like collaboration, social networking, community, content management, utility, calendaring, HRM all are available in these catalogs.

The Web Services for Remote Portlets specification defines a web service interface for accessing and interacting with interactive presentation-oriented web services. In summary, these cacheability levels give you the ability to provide as many hints about the cacheability as possible to the runtime. How can the portlet get access to these public render parameters?

You must have a resource URL to trigger the new serveResource life-cycle method. Using validation-based caching is beneficial only if the operations for creating the markup are expensive compared to the operations for checking the back-end state. This specification means that you must set at least an expiration time using response.


In JSR support other web frame works to run in portlet container so that developer can develop portlet in any web application frame work and run in the portlet container with help of small changes.

This method also used specially for Ajax portleet in portlet, to call this method we will use different URL i. The other mentioned materials will be taken into account to create a version 2.

Introduction to JSR / Portlet Specification ~ Liferay Savvy

Implementing two-part rendering is straightforward if you extend GenericPortlet and override the methods that GenericPortlet provides, such as getTitle and getHeaders.

This servlet, however, was then addressed directly and not through the portal framework, so it did not have the portlet state provided, nor was it under the security protection of the portal, as you can see in figure 4.

The portlet container can then provide you with this ETag in the request of the next render or serveResource call, indicating that it still has the cached content available, which can be revalidated. Container runtime options allow the portlet to supply specific options to the portlet container that either change default behavior defined in the Java Portlet Specification or add additional behaviors.

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

Why do we need this additional JAXB serialization? 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 to 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.

A portlet can also set the cache scope programmatically using a response property or the new CacheControl interface. A QName consists of a namespace for example, http: In some cases, you may want to specififation manage setting specific properties on portlet URLs or to enhance the portlet URL creation of existing portlets. Note that setting the cacheability of a resource response makes sense only if you allow the response to be cached by specifying HTTP caching headers for the returned response.

You now need to include the new tag library with: In JSR was added another feature called serving resources with help of this we can serve the images, pdf and other content types to client. Listing 5 is an example of a filter that does some pre- and post-processing and provides pkrtlet portlet with a wrapped request.


Standard portlet API

Views Read Edit View history. From Wikipedia, the free encyclopedia.

Generally Portal specification is different and we will use portlet container to manage portlets and its lifecycle. The new Portlet Specifications will add functionality that was not addressed in the first version specification, other JSRs were not final at the time JSR went to porlet review e. Thus, the portal does not have a chance to update other parts of the page where this information may be encoded; for example, in WebSphere Portal specificaation URLs contain this information and so need to be updated.

The Java Community Process(SM) Program – JSRs: Java Specification Requests – detail JSR#

Thus, the browser can cache the returned markup of the serveResource call for at least as long as the user interacts jst the current page. Each filter gets the current request and response, or a wrapped version created by a preceding filter, and the filter chain. Portlet Specification, Version 1.

This will add advantage to perform some events or some actions before portlet is rendered. Finally, you get better support for Ajax-based use cases with JSR as you are now able to serve resources directly though the portlet. Some examples of portlet applications are e-mailweather reportsdiscussion forumsand news. If you want to provide the portlet with additional capabilities, set an object providing access to these capabilities as a request attribute. Thus, you can dramatically reduce the memory footprint for these portlets, as the code in listing 9 shows.

To be determined by the expert group, initial target is to speicfication a working EG by Decembera early public draft beginning ofa public draft by mid and a final version by end of A portlet container receives requests from the portal to execute requests on the portlets hosted by it.

You can find a complete list of the members of the expert group here.