Some confusion exists in the portlet development community, because many vendors tout their compliance with JSR standards and less rarely talk about JSR compatibility. I think this is mostly due to the fact that prior to JSR becoming mainstream, the standards were loose and vendors built to their own specifications. So becoming compliant with JSR was and still is a big deal. In addition, while the JSR spec has been out since , it took the Portal vendors some time to update their Portal Servers to support the new standard. Now all the major vendors support JSR on their Portal server.
|Published (Last):||22 September 2008|
|PDF File Size:||2.99 Mb|
|ePub File Size:||19.92 Mb|
|Price:||Free* [*Free Regsitration Required]|
We will then refactor and extend the Portlet to see how some of the patterns of Servlet development might be used. It is assumed that the reader is familiar with Java, Web applications, and Maven. We will be building a Portlet which will display random quotes by random authors. Maven 2. Note that the CSS class definitions would be provided by the Portal. We'll let Maven do a lot of the work of setting up the java classpath and packaging things.
With Maven rocking and rolling, we can create our project artifact — a. First, deploy the portlet:. Now, we create a new "page" which indicates to Jetspeed-2 that it should render our Portlet. Jetspeed-2 will also display other Portal goodies navigation, login box, logos on this screen:.
Now we will bring over some programming conventions that have made Web application development and maintenance go a lot more smoothly. Now that we have an object model, maybe we can separate our data acquisition from how we want to display that to the user. The jsp uses the portlet tag library which "enables JSPs Jetspeed-2 will re-load the portlet appliction, so the steps for pushing these changes can be as simple as repackaging the.
Tomcat may be up and running for this, but Jetspeed-2 seems to prefer that Tomcat is restarted after a redeployment. In the next few steps we will enhance our example to take advantage of the personalization features defined in the Portlet Specification. Specifically, we will access the portlet preferences as well as allow an end user to edit these values.
Instead of hard-coding the number of Quotes to display, we declare that in the Portlet deployment descriptor. We want to let users change the number of quotes being displayed.
This implies a change of state in the Portlet. The specification denotes that "commonly, during a render request, portlets generate content based on their current state. The specification describes an action request which is more geared towards state changes.
Since we will be editing the portlet, we would probably be better off exposing this functionality in the EDIT Portlet mode. In order to give the user access to this new Portlet screen, we must make sure to update Portlet deploment descriptor so that the Portal knows that EDIT is supported.
Jetpseed-2 exposes this by adding an Edit link to the Portlet title bar. A class implementing this interface may be associated to the Portlet to verify the validity of the preference values. The Portal will use the above implementation to assert that the preferences are valid. The Portlet deployment descriptor must first declare this association. JSR— paves the way for a personalized user experience with content from a wide range of sources all centralized in one easy-to-find location.
The API gives developers a roadmap for producing plug-and-play applications that can instantly add value to a Web site. There are some frameworks available to provide some of the structure available to Servlet programmers JSF, WSRP, Struts-Bridges, Spring ; however, these do seem to be in their infancy and there is a lot of room for new conventions and libraries to simplify the common cases.
Search Site Map. IOException ;. PrintWriter ;. GenericPortlet ;. PortletException ;. RenderRequest ;. RenderResponse ;. Log ;. LogFactory ;. List ;. ArrayList ;. Collection ;. PortletPreferences ;. PreferencesValidator ;. ValidatorException ;.
Java Portlet Specification
As of Jetspeed 1. Note that Fusion is an optional feature of Jetspeed 1. You must specifically build Fusion, or download the Fusion distribution as it is not included in the default distribution or in the default build. Fusion enables Jetspeed-1 to run standard Java Portlet applications in Jetspeed This was made possible by leveraging the component architecture in Jetspeed
Introducing the Portlet Specification, Part 1
Different implementations are available today, the following list enumerates some of them: Apache Software Foundation: Jakarta JetSpeed 1. Identification Request Contributions Section 1. Section 2: Request. The Portlet specification will define a Portlet API that provides means for aggregating several content sources and applications front ends. It will also address how the security and personalization is handled.