Registering WSRP Producers in Enterprise Configurations

Creating Java Portlets 6-31 – PortletPersonalizationManager oracle.portal.provider.v2.personalize.PortletPersonalizationManager – PortletSecurityManager oracle.portal.provider.v1.http.DefaultSecurityManager ■ The Provider Utilities provide methods for simplifying the rendering of portlets. The utilities include methods for constructing valid links hrefs, rendering the portlets container including the header, rendering HTML forms that work within a portal page, and supporting portlet caching.

6.5 Building Oracle PDK-Java Portlets with Oracle JDeveloper

Using the Oracle PDK-Java Portlet Wizard in Oracle JDeveloper you can begin your portlet development quickly and easily. This section assumes the following: ■ You are familiar with portlet terminology such as portlet Show modes. Refer to Chapter 1, Understanding Portlets and Section 6.1, Guidelines for Writing Java Portlets . ■ You are already familiar with Oracle JDeveloper and know how to build and deploy Java components using it. You can download Oracle JDeveloper from OTN. Visit the Oracle JDeveloper page on OTN: http:www.oracle.comtechnologyproductsjdevindex.html This section contains the following sections: ■ Section 6.5.1, Creating an Oracle PDK-Java Portlet and Provider ■ Section 6.5.2, Adding Portlet Logic to Your Oracle PDK-Java Portlet ■ Section 6.5.3, Validating Your Oracle PDK-Java Portlet and Provider ■ Section 6.5.4, Deploying Your Oracle PDK-Java Portlet to an Application Server ■ Section 6.5.5, Registering and Viewing Your Oracle PDK-Java Portlet

6.5.1 Creating an Oracle PDK-Java Portlet and Provider

This section walks you through the Oracle PDK-Java Portlet Wizard. You can choose which portlet Show modes you want to implement and the implementation method JSP, HTTP servlet, Java class, or HTML. The wizard then creates a simple sample implementation for each of the selected modes. The steps to create a portlet and provider are as follows: 1. Start Oracle JDeveloper. 2. In the Application Navigator, expand the application under which you want to create your portlet. 3. Right-click the project under which you want to create your portlet, and select New. 6-32 Oracle Fusion Middleware Developers Guide for Oracle Portal

4. In the New Gallery, expand the Web Tier category and select Portlets.

5. In the Items list, select Oracle PDK-Java Portlet

Figure 6–22 . Figure 6–22 New Gallery Dialog Box for Oracle PDK-Java Portlet

6. Click OK to display the Provider Details Page

Figure 6–23 . Note: If you do not have a project yet, you can create one in one of the following ways: ■ Right-click an existing application in the Application Navigator and choose New Project. Select Empty Project and click OK. Fill out the Create Project dialog box and click OK. ■ Right-click the Applications node and choose New Application. Fill out the Create Application dialog box and click OK. When the Create Project dialog box appears, fill it out and click OK. Note: Selecting Standards-based Java Portlet opens the Portlet Wizard for creating JPS-compliant portlets. Selecting Oracle PDK-Java Portlet opens the Portlet Wizard for creating PDK-Java portlets.