These tutorials, CBTs and tips are designed to help any Java professional who is looking to acquire JSR development skills to become quickly adept at both. In this three-part series, the articles describe new features available in the Java Portlet Specification (JSR ) and extensions supported by OpenPortal. Portlet Tutorial, Java Portlet, Portlet Example, Java Portlet Tutorial, What is Portlet , JSR has introduced the using of annotations for controlling things were.

Author: Grobei Tajinn
Country: Bulgaria
Language: English (Spanish)
Genre: Environment
Published (Last): 22 July 2014
Pages: 275
PDF File Size: 10.75 Mb
ePub File Size: 9.48 Mb
ISBN: 814-4-49238-293-2
Downloads: 96412
Price: Free* [*Free Regsitration Required]
Uploader: Tojak

Then, compile the portlet using the fully qualified path to the Java portlet source. The portlet is provided along with the source in the IBM Portlet Samples package, which is available from the portlet catalog by searching for navcode 1WPZ.

Before you begin developing portlets, set up an environment that makes the tasks of writing, compiling, and testing portlets easier. Packaging portlet classes, resources, and descriptive information in a single file makes tuotrial and deployment of tutoorial easier.

If you are familiar with the web. To facilitate deployment of portlet applications and complex portlets, you can provide a portlet configuration file that can be invoked by the XML configuration interface XMLAccess.

Application class loaders AC1application class loaders AC2and application class loaders AC3 are portlet applications that branch from application extensions.

For more information, see The XML configuration interface. To do this, proceed as follows: To deploy a portlet and run it on the server, it must be packaged in the form of a Web application ARchive or WAR file. Compile your Java source files. Hello World provides the fewest methods required for a portlet.


If this value has not been specified, specify the WAR file name of the rutorial application in its place. The graphic illustrates where WebSphere Portal Express and portlet applications fit into the classloading hierarchy.

Refer to the documentation for Rational Application Developer for complete setup instructions. If you suspect a classloading problem, ensure that the required classes are in the appropriate classpath according to the classloading hierarchy.

Creating a simple portlet

A particular class loader can reference other classes as long as the other classes can be loaded by the same class loader or any of its ancestors, but not its children. The Hello World portlet provides an introduction to writing your first portlet.

For portlet updates, the WAR file name must be the original name of the WAR file used to install the portlet application. On a portal server running on Windows, installing a WAR file with a name that tutoria, more than 25 characters will result in an error. You can also run the build-war-file or build-ear-file tasks to build the. See Sample portlets for more information.

In the following graphic runtime classpath patches RCP is located at the top of the hierarchy.

Creating a simple portlet

Use this file if you use services from the Public API javadoc package. Use this file if you use services from the Public SPI javadoc package. There are number of differences between the elements tuforial this example and the corresponding Figure 8. The resources can be images, JSP files, Writing the portlet descriptorsand property files containing translated message text. The XML configuration interface allows the portlet developer to specify places, pages, themes, skins, supported markups and clients, and other settings for a portlet application.


When constructing XMLAccess scripts for use in installing standard portlets, use the following values: If you are not using wizards to develop portlets, the following topics describe the mechanics of building a simple portlet.

GenericPortlet which also can throw a PortletException. This is especially useful for portlets that use messaging because these portlets have to be placed on the same page.

Therefore, the portal server copies was. The portlet information directory is not part of the public document tree of the application. Omit this tag if the portlet does not use this feature.

Next, the portlet must be packaged in the JAR file format. View the basic steps for creating a simple portlet, that include writing the portlet code, compiling java source, creating the JAR file, writing the portlet descriptors, setting up the WAR file directory structure, and packaging and deploying portlets. You can also build portlets using your own development environment and tools.

Runtime extensions RE branches from runtime classpath, and application extensions AEX branch from runtime extensions.