Introduction to Oracle PDK-Java

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. Creating Java Portlets 6-33 Figure 6–23 Provider Details Page

7. In the Provider Details page, enter a name for the new producer that will contain

your portlet. This name must be unique within the project. In the PDK-Java, the term provider is used instead of producer. A provider is exactly the same thing as a producer.

8. Select Generate Deployment Properties File.

This automatically generates two .properties files: ■ serviceID.properties defines properties for a producer with that service ID. The service ID has the same value as the producer name. ■ _default.properties is a default properties file. A producer application may have more than one producer, each with its own service ID. On registration, if no service ID is defined, then the default properties file is used.

9. Select Generate XML Entries.

This automatically generates a producer definition file provider.xml for the producer that contains details of the portlets belonging to the producer, including those generated by the wizard.

10. Select Generate Index JSP.

This automatically generates an index.jsp file that lists all the producers that reside in the application with hyperlinks that enable easy access to producer test pages.

11. Click Next to display the General Portlet Information Page.