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
|Published (Last):||18 January 2007|
|PDF File Size:||10.53 Mb|
|ePub File Size:||15.7 Mb|
|Price:||Free* [*Free Regsitration Required]|
After doing its preprocessing, the filter implementation can either terminate the request processing or call the next element in the filter chain, passing in either the received request and response or additional wrappers.
A Portlets Catalog is a set of portlets that are ready-to-use components for enterprise portals.
How do you know which back-end state the currently cached markup maps to? An example is a programmatically generated SVG view that depends on the portlet preferences for back-end access. GenericPortlet also lets you use the following annotations to make dispatching life-cycle calls to specific handler code easier:. This article provides an overview of the main new features in JSR and some examples of how to leverage these features.
What’s new in the Java Portlet Specification V2. You can find a complete list of the members of the expert group here. 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.
Access to all these life-cycle listeners gives you many hook points for managing objects related to these lifecycles, which is a great feature for many frameworks.
This limitation had some disadvantages:. For deployers, it’s easy to keep a single set of solution and deploy it on many.
Portlet Specification, Version 1. This addition means that you can now dispatch to action or event logic written in a servlet, or you can do forwards when serving resources try to forward to the resource ID that you have set on a ResourceURL. Thus, you can dramatically reduce the memory footprint for these portlets, as the code in listing 9 shows.
Java Portlet Specification (JSR ) Support
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. We will provide early public drafts in order to get public feedback as early as possible. Keep in mind that because of the missing state information, you are restricted in the output of serveResource: A portlet may want to send an specificahion to a remote portlet that is running using WSRP. You must have a resource URL to trigger the new serveResource life-cycle method.
This practice is common for Ajax applications, which can particularly benefit from the two enhancements that version 2. JSR defines a list of container runtime options that are all optional except for actionScopedRequestAttributes.
The expert group of JSR consists of all the major commercial and open-source portal developers, portlet bridge developers, and portlet framework developers. 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.
The Java Community Process(SM) Program – JSRs: Java Specification Requests – detail JSR#
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. 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. Parameters that have the same key first get portlrt resource parameter values merged and then either the private or public render parameter values, depending on whether the parameter key was declared as a public render parameter in 826.
In this case, the portlet rendering portlrt add anything to the head section of the document, as the head section is already written.
This detail was the hard part; now your work is getting simpler: JSR is the Java Portlet specification v2. One example jer implementing a mapping of resources to shared IDs.
Validation-based caching is useful for situations in which you do not want to recompute the markup of a portlet often because it is an expensive operation. January Learn how and when to remove this template message. Java enterprise platform Java specification requests Web portals. Therefore, you need to provide this information in the portlet. The Web Services for Remote Portlets specification defines a web service interface for accessing and interacting with interactive presentation-oriented web services.
This backward compatibility specificatio also includes the deployment descriptor in which V2. Generally in wpecification portlet transition state will always change from Action Phase to Render Phase when we perform actions.
Java Portlet Specification
View image at full size. 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 entry per portlet window and user.
You can see that the Ajax calls go through the portal servlet and thus are specificahion the control of the portal. Note, however, that no life-cycle calls are defined around the portlet window, so if you use the portlet window ID for specifying namespace entries in a persistent data store, you also need to clean up these entries yourself.
The QName and alias names are used to connect public render parameters of different portlets. The portal administrator or business user has now put these three portlets on a page and porlet connections between the specififation portlet Portlet 1 and the receiving portlets Portlet 2 and Portlet 3. How can specificqtion portlet get access to these public render parameters?
At runtime, a filter chain of all the filters is applied to the portlet. It also provides persistent storage mechanisms for the portlet preferences.
The portlet can declare such a mode in the portlet deployment descriptor with the code shown in listing 6. This page was last edited on 21 Novemberat This article needs additional citations for verification.
It was completed in JCP version 2.