Step 6: Create a Portlet

In this step, you will create a portlet out of the content selector. During this process, a Java Server Page (JSP) will automatically be created that will be used to show the personalized content in the portlet.

Create a Portlet

  1. In WebLogic Workshop, expand the sampleportal project in the Application window and choose double-click sample.portal to open the portal file.
  2. In the Application window, expand the data\contentselectors\GlobalContentSelectors directory.
  3. Drag modern.sel into the portal just below the Login to Portal portlet.

  4. When prompted to create a portlet, click Yes.
  5. In the Portlet Wizard that appears, enter the following:

    Title: My Personalized Portlet

    Content URI: /myp13n.jsp
  6. Click Finish.
  7. In the Generate Files window that appears, click OK.
  8. Save the sample.portal file.

The new portlet is added below the Login to Portal portlet, and the following resources have been created in the \sampleportal directory: modern.portlet and myp13n.jsp.

In the next step, you will open the new JSP, view the code that was generated for the modern content selector, and add code to include the classic content selector.

Click one of the following arrows to navigate through the tutorial: