In this three-part series, the articles describe new features available in the Java Portlet Specification (JSR ) and extensions supported by OpenPortal. The Java platform provides an standard referred to as JSR that standarizes how portlets interact with portlet containers and ensures compatibility across. In , Java Portlet Specification (JSR) first defined portal and For a detailed description of these features, see the tutorial OSGi and Modularity. Note .
|Published (Last):||17 March 2004|
|PDF File Size:||9.32 Mb|
|ePub File Size:||8.66 Mb|
|Price:||Free* [*Free Regsitration Required]|
For example, you can develop your portlet with strictly standards-compliant frameworks and APIs, package it in a WAR file, and then deploy it on any standards-compliant portal container.
Creating a simple portlet
A Java portlet resembles a Java Servletbut produces fragments rather than complete portleet, and is not bound by a URL. Like many web apps, portlets process requests and generate responses. Views Read Edit View history.
Once the portlet processes all events, the portal calls the Render phase on all portlets on the page. The recently released Java Portlet Specification 3.
Java Portlet Specification – Wikipedia
For example, the Edit mode of a weather portlet could let you choose a location to retrieve weather data from. Packaging portlet classes, resources, and descriptive information in a single file makes distribution and deployment of portlets easier.
See Sample portlets for more information. Omit this tag if the portlet does not use this feature. Compile your Java source files.
Web apps in Liferay Portal are called portlets. There are number of differences between the elements in tuttorial example and the corresponding Figure 8. This is especially useful for portlets that use messaging because these portlets have to be placed on the same page. This makes portlets much more flexible than servlets.
For example, a portlet application might use a portlet descriptor as follows: In the following graphic runtime classpath patches RCP is located at the top of the hierarchy. Typically, following the desktop metaphora portal page is displayed as tutorlal collection of non-overlapping portlet windows, where each portlet window displays a portlet. A portlet container is not responsible for aggregating the content produced by the portlets; the portal itself handles aggregation. Portlets instead access a javax.
Runtime extensions RE branches from runtime classpath, and application extensions Jer branch from runtime extensions. For portlet updates, the WAR file name must be the original name of the WAR file used to install the portlet application.
For more information, see The XML configuration interface. This article needs additional citations for verification. Even so, the advantages of modularity are so great that we still recommend you develop your portlets as OSGi modules.
Creating a simple portlet
The last thing you want is for someone to grow frustrated with your site because of constant page This page was last edited on 21 Novemberat The following shows the minimum elements required for the standard portlet deployment descriptor. A portlet application exists as a structured hierarchy of directories. Runtime classpath RP branches from runtime classpath patches. Portlet filters are similar to servlet filters in that they allow request and response modification on the fly.
It uses the portlet response object to write simple output directly to the portal page. Portlets contained in WAR files have the advantage of being dynamically downloaded and installed. The resources can be images, JSP files, Writing the portlet descriptorsand property files containing translated message text.
GenericPortlet which also can throw a PortletException. Use this file if you use services from the Public SPI javadoc package. Types of portlet solution vertical domains and technology like collaboration, social networking, community, content management, utility, calendaring, HRM all are available in these catalogs.
Each portlet phase executes different operations: Articles needing additional references from January All articles needing additional references. For deployers, it’s easy to keep a single set of solution and deploy it on many.
You can also run the build-war-file or build-ear-file tasks to build the. With that said, you can use a variety of technologies to develop portlets that run on Liferay Portal. Liferay Portal does, however, provide utility methods that can access the ServletRequest and query parameters. This gives you access to all the MVC Portlet functionality you are familiar with, plus the added bonus of using Soy templates for