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.
|Published (Last):||13 September 2005|
|PDF File Size:||19.46 Mb|
|ePub File Size:||7.45 Mb|
|Price:||Free* [*Free Regsitration Required]|
The GenericPortlet class does the rest for you. Now the Java Portlet Specification has grown up, and it allows you to implement most use cases without the need to have vendor extensions. Subscribe me to comment notifications. The specification and the APIs more than doubled compared specificaation version 1. 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.
If you want to provide the portlet with additional capabilities, set an object providing access to these capabilities as a request attribute.
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. 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.
Each filter gets the current request and response, or a wrapped version created by a preceding filter, and the filter chain.
Java Portlet Specification
Support for WSRP 2. Generally Portal specification is different and we will use portlet container to manage portlets and its lifecycle. One advantage of serving resources through a servlet is less overhead because the request does not have to pass through the additional portal framework, for example, when serving large media streams.
A portlet container contains portlets and manages their life cycles. In most cases, the portlet code does not actually need to change whether a render parameter is public or private, so you can enable your portlet for coordination by simply declaring those parts of the view state information in the portlet.
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 public review e. Typically, connections are defined explicitly at page creation time, or they are automatically inferred by the portal at runtime. In JSRall cache entries were private for each user.
Introduction to JSR / Portlet Specification ~ Liferay Savvy
Specificatino a portlet or collection of portlets resembles a web-based application that is hosted in a portal. The runtime also can enhance the cacheability of resources in other ways, for example by keeping track of the state changes on the client and re-rendering only the parts affected by state changes. For example, a ShowShoppingCart portlet mode lists all entries that you currently have in your shopping cart. After the action and event processing have finished, the rendering lifecycle starts and the portlets can create new markup based on the state updates that occurred in the action and event phases.
You can also set an additional resource ID on the resource URL that clearly identifies your resource. How can the portlet get access to these public render parameters?
Java enterprise platform Java specification requests Web portals.
But we have many elegant web application frameworks. Inter portlet communication is mechanism to send or receive porlet between two portlets. The requirement areas we intend to address include, but are not limited to, the following: With the help of Ajax we can avoid render all portlets in page. This call now allows you to use this ID as key for data that you want to create namespace per portlet window; for example, the portlet wants to cache data that it received from a back-end system per portlet window.
Instead, you needed an additional servlet that served the resources.
The Java Community Process(SM) Program – JSRs: Java Specification Requests – detail JSR#
Thus, the event broker calls the processEvent life cycle method introduced with version 2. Since then, nearly all the vendors in the Java portal space, both specifucation and open-source vendors, have implemented this standard, and developers have written portlets using the Java Portlet API. 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 apecification can see in figure 4.
Typically, following porglet desktop metaphora portal page is displayed as a collection of non-overlapping portlet windows, where each portlet window displays a portlet. As an incremental upgrade to the technology, we will be building on the last revision, version 1.
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. We will provide early public drafts in order to get public feedback as early as possible.
If you want to specifically access only public render parameters in your code, then you can also use the method getPublicParameterMap on the request. In both cases, the portal needs to know what kind of events a portlet can receive and send.
The Java Portlet Specification V1. Portlets can therefore be viewed as user interface UI -based services that take the Service-Oriented Architecture SOA approach all the way up to the user interface.
Here Portlets catalog are of use. Newer Post Older Post Home. The portal should provide UI controls that allow the portlet to switch to this mode.
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. The JSR tag library has its own namespace so that new additions do not interfere with portlets using the old JSR tag library.
This markup is intended to be aggregated with other markup fragments into a larger application, for example, a portal page as shown in figure 1.
These two parts are needed as some portal implementations, such as WebSphere Portal, stream the page and portlet output directly to the client to avoid buffering overhead.
If, for example, the request to the back-end server takes up 90 percent of the time to render the portlet, it does not make sense to use validation-based caching to save only the remaining 10 percent rendering time.
Figure 5 depicts the solution in JSR