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: Arakora Shadal
Country: Burma
Language: English (Spanish)
Genre: Relationship
Published (Last): 23 November 2006
Pages: 484
PDF File Size: 15.52 Mb
ePub File Size: 11.19 Mb
ISBN: 260-3-59045-861-5
Downloads: 80392
Price: Free* [*Free Regsitration Required]
Uploader: Gajin

You can set up the run time environment for debugging portlets on the local development machine or on a remote server. Standard portlets Table 2. Refer to the documentation for Rational Application Developer for complete tutorjal instructions.

Creating a simple portlet

You can also build portlets using your own development environment and tools. Next, the portlet must be packaged in the JAR file format.

When constructing XMLAccess scripts for use in installing standard portlets, use the following values: If an installed portlet application includes a class gutorial, the portlet application class loader is an application class loader ACx under WebSphere Portal Express.

Portlets contained in WAR files have the advantage of being dynamically downloaded and installed. To facilitate thtorial of portlet applications and complex portlets, you can provide a portlet configuration file that can be invoked by the XML configuration interface XMLAccess.

Therefore, the portal server copies was. The WAR file format contains the Java classes and resources that make up one or more portlets in a portlet application.

Use this file if you use services from the Public SPI javadoc package. The following shows the minimum elements required for the standard portlet deployment descriptor. See Sample portlets for more information.

Runtime extensions RE branches from runtime classpath, 268 application extensions AEX branch from runtime extensions. 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.


Creating a simple portlet

Hello World provides hutorial fewest methods required for a portlet. Runtime classpath RP branches from runtime classpath patches. For example, a portlet application might use a portlet descriptor as follows: To do this, proceed as follows: If this value has not been specified, specify the WAR file name of the portlet application in its tuhorial.

A portlet application exists as a structured hierarchy of directories. WebSphere Portal Express includes an administrative portlet for installing, uninstalling, and updating portlets. Compile your Java source files. 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.

For portlet updates, the WAR file name must be the original name of the WAR file used to install the portlet application. The portal administrator can download a WAR file from the Internet and then use the portal administration interface to install the portlet to WebSphere Portal Express. To deploy a portlet and tutoroal it on the server, it must be packaged in the form of a Web application ARchive or WAR file.

Then, compile the portlet using the fully qualified path to the Java portlet source. There are number of differences between the elements in this example and the corresponding Figure 8. That is, the WAR file name can be changed, but the uid must indicate the original uid used during portlet installation.

It uses the portlet response object to write simple output directly to the portal page. The tutoriql illustrates where WebSphere Portal Express and portlet applications fit into the classloading hierarchy.

If you are familiar with the web. For more information, see The XML configuration interface. Before you begin developing portlets, set up an environment that makes the tasks of writing, compiling, and testing portlets easier. Rational Application Developer provides wizards to help you build, test, and deploy portlets using all of the APIs and related classes and interfaces available in the portlet run time environment. The application server searches for security policy files in the location of the enterprise application archive rather than the Web application archive.


You can also run the build-war-file or build-ear-file tasks to build the. If you suspect a classloading problem, ensure that the required classes are in the appropriate classpath according to the classloading hierarchy. If you are not using wizards to develop portlets, the following topics describe the mechanics of building 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. Because Windows limits the maximum tutoriial length to characters, the name of the WAR file must be less than 25 characters.

The portlet information directory is not part of tutoriak public document tree of the application. Before you package your portlet, the class files and resources must be arranged in the WAR file directory structure described here. Use this file if you use services from the Public API javadoc package. On a portal server running on Windows, installing a WAR file with a name that is more than 25 characters will result in an error. In the following jsf runtime classpath patches RCP is located at the top of the hierarchy.

The resources can be images, JSP files, Writing the portlet descriptorsand property files containing translated message text.