Version of the Portlet Specification plans to align with J2EE , integrate other new JSRs relevant for the portlet, and align with the WSRP specification V Learn all about the second version of the Java Portlet Specification (JSR ). In Version , the specification and the APIs more than doubled. Version of the Java Portlet Specification extended the capabilities to was approved by the Java Community Process in March as JSR

Author: Jutilar Tygojas
Country: Uzbekistan
Language: English (Spanish)
Genre: Automotive
Published (Last): 10 January 2006
Pages: 444
PDF File Size: 1.39 Mb
ePub File Size: 1.45 Mb
ISBN: 763-3-33452-275-3
Downloads: 59513
Price: Free* [*Free Regsitration Required]
Uploader: Fenrik

Specifying the shared property enables the portal to use only one version of such shared resources per page.

It allows you to define a short expiration time so that your portlet gets called often and can check for changes in the back-end system. The JSR specification demanded that portlet containers must invalidate the cache for each user interaction with a portlet render or action URLso that there could be only a single cache specificatikn per portlet window and user.

This setting means that the portal can generate a URL that does not contain any interaction state of the page and the portlets on the page.

Standard portlet API

View image at full size. Retrieved from ” https: The JSR tag library has its own namespace so that new additions do not interfere with portlets using the old JSR tag library.

Typical applications of portlet filters could include these:. The first approach allows more control and flexibility, while the second is easier to use. If this specification, or a future version of this specification, is included in a future version of a Java platform specification, this specification will remain available for use outside the platform specification, and will continue to be evolved outside the platform specification.

Figure 2 depicts the details of how 2.00 distribution works. 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. Portlet 1 defines that it can publish some event A in its portlet.


Some of its major features include: Full and shared cacheable resources such as shared static resources, for example, JavaScript libraries.

To support these use cases, JSR introduces the portlet-managed modes that are not known to the portal, but are managed by the portlet itself. A servlet request listener can distinguish a plain servlet request specificaation to a servlet from a wrapped servlet request targeted to a portlet by looking at the request attribute javax. JSR specifications offer suitability to the developers to reuse the code specificatiln maintain speclfication set of JSR compliant portlets.

You can also leverage the namespace for JavaScript function calls that are embedded in Ajax responses, and you can reuse namespaced JavaScipt functions provided by a previous render call. This article needs additional citations for verification. This attribute is set on a request targeted to a portlet, indicating the current portlet life-cycle phase of this request.

The QName and alias names are used to connect public render parameters of different portlets. The expert group of JSR consists of all the major specificaiton and open-source portal developers, portlet bridge developers, and portlet framework developers. In JSRthe portlet could leverage only pirtlet modes that are supported by the portal framework running the portlet.

The important feature in JSR is Inter portlet communication. 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.

Standard portlet API

As a result of not encoding any state of the page and portlets specificatoin the page, you cannot count on getting the current render parameters, portlet mode, or window state in your portlet. Portlet Specification, Version 1.

Full cacheable resources, which do not depend on interaction state. This specification means that you must set at least an expiration time using response. On the other hand, you may want to respond quickly to changes in your back-end system and provide an updated view of the portlet. An example is a programmatically generated SVG view that depends on the portlet preferences for back-end access. Note that setting the cacheability of a resource response makes sense only if you porltet the response to be cached by specifying HTTP caching headers for the returned response.


Let’s take a deeper look into the new features for extending the Java Portlet Specification in the next sections.

Java Portlet Specification (JSR ) Support

You can specify a full QName for each event, portlrt if you use the same namespace for many events, you can declare it as the default namespace and then specify only the local part of each event.

You indicate that your portlet requires a specific container runtime option in the deployment descriptor using the code shown in listing 7. You can now implement additional use cases such as asynchronous updates that make your user interface more responsive. The ordinary parameter access methods return the merged set of these three parameter maps.

Java Portlet Specification 2.0 (JSR 286) Support

Now the user interacts with Portlet 1 and triggers an action on Portlet 1. Using cookies You can set cookies at the response of each life-cycle method processAction, processEvent, render, and serveResource with this code: Extending GenericPortlet has the additional advantage of being able to use annotations for denoting special methods for handling events, processing actions, and rendering a specific portlet mode.

Why do we need this additional JAXB serialization?