This JSR development tutorial shows how to master request-response programming using the PortletRequest and PortletResponse objects of the Portlet JSR (Portlet ) defines a lifecycle for events, so that eventing is name as defined in the previous code example in the portlet section of the file. Portlet Tutorial, Java Portlet, Portlet Example, Java Portlet Tutorial, What is Portlet , JSR has introduced the using of annotations for controlling things were.

Author: Tobei Daran
Country: Lesotho
Language: English (Spanish)
Genre: Software
Published (Last): 28 November 2004
Pages: 89
PDF File Size: 13.45 Mb
ePub File Size: 12.5 Mb
ISBN: 446-3-78937-625-4
Downloads: 54119
Price: Free* [*Free Regsitration Required]
Uploader: Muramar

Liferay is an open platform in an ecosystem of open platforms. The oortlet structure in this tutorial does not differ greatly from the previous example, with the exception of adding some JSP files detailed later. A good user experience is the measure of a well-designed site. The compiled Java class implementing javax.

Creating a simple portlet

Porltet Global metadata is declared in the portlet. Please check the source code to see the difference with Method 1. This sample is used in the following examples. This makes portlets much more flexible than servlets. The path to the global portlet. Rational Application Developer provides wizards to help you build, test, and deploy portlets using all of the Jdr and related classes and interfaces available in the portlet run time environment.

We pass the parameter to the render phase, using valid XML: Portlets contained in WAR files have the advantage of being dynamically downloaded and installed. The GenericPortlet render implementation calls our implementation when the view mode is requested.


Creating a simple portlet

To do this, proceed as follows: This class is part of the JBoss Portlet Bridge This is a mandatory parameter to define what’s the default page to display. You can set up the run time environment for debugging portlets on the local development machine or on a remote server. This ensures that the portlet will render well within the theme and across portal vendors. Doing all this in other types of web apps would require manual re-coding. The portlet specification only provides a mechanism for a portlet to read its own URL parameters or those declared as public render parameters.

Liferay leads in this space by having a member in the Expert Group.

Portlets – Liferay – Liferay Developer Network

This example can be used as a base to configure instead of creating a new application. One when the portlet is rendered and two when the portlet is actioned then rendered.

Like many web apps, portlets process requests and generate responses.

The EDIT button only appears with logged-in users, which is not the case in the screenshot. The graphic illustrates where WebSphere Portal Express and portlet applications fit into the classloading hierarchy.

If this value has not been specified, specify the WAR file name of the portlet application in its portoet. This section shows you how to develop portlets using the following frameworks and techniques: Refer to the documentation for Rational Application Developer for complete setup instructions.


Window states mimic window behavior in a traditional desktop environment: Portlet interface uses the javax. More than one portlet application may be defined in this file:.

Because Windows limits the maximum path length to characters, the name of the WAR file must be less than 25 characters. InJava Portlet Specification 2. That is, the WAR file name can be changed, but the uid tutorail indicate the original uid used during portlet installation. Use this file if you use services from the Public SPI javadoc package.

For portlet updates, the WAR file name must be the original name of the WAR tutlrial used to install the portlet application. This software allows developers to write a portlet application as if it was a JSF application. Portlet Mode and Window State. The three states defined by the JSR specification are:.

In short, portlets alleviate many of the traditional pain points associated with developing web apps. It is perfectly valid to bring the tools Use this file if you use services from the Public API javadoc package. If you are not using wizards to develop portlets, the following topics describe the mechanics of building a simple portlet.

One key difference is that portlets run in a portion of the web page.