16.4 Installing a portlet in Remote Portal

 < Day Day Up > 

When the portlet is not available in the remote Portal server, you will need to install it using the administration tools. In this section of the lab, you will export a portlet application (HelloWorld) from WebSphere Studio and manually install it in the remote Portal server.

Exporting the portlet application (WAR file)

The HelloWorld portlet will be used for this scenario. Follow these steps to export the portlet project and create a WAR file:

  1. In the J2EE Navigator panel, right-click the HelloWorld portlet project and select Export .

  2. Select WAR file .

  3. For example, provide the project name HelloWorld and the target location as c:\LabFiles\RemoteAttach .

    Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

Figure 16-13. Exporting HelloWorld

graphics/16fig13.jpg

Installing the portlet in Portal using Portal Administration

In this section, we provide a sample administration procedure to create a new page, install a portlet and add this portlet to the created page.

  1. Start the external Web browser (IE) and connect to the portal:

     http://portaldev.itso.ral.ibm.com:9081/wps/portal 
  2. Log in to the portal as the administrator ( user ID = padmin and password = its0lab ).

    Note : Password uses the number 0.

    Figure 16-14. Login to WebSphere Portal

    graphics/16fig14.jpg

  3. Click the Administration link.

    Figure 16-15. Administration link

    graphics/16fig15.gif

  4. Choose Portal User Interface -> Manage Pages .

    Figure 16-16. Manage Pages option

    graphics/16fig16.gif

  5. Click the My Portal label.

    Figure 16-17. My Portal Label

    graphics/16fig17.gif

  6. Click New label to create a new label.

    Figure 16-18. Select New Label

    graphics/16fig18.gif

  7. On the Create Label page, enter this information:

    - Place Name: My Label

    - Theme: Science or any other theme of your preference.

    - Supported markup: HTML . Click the + sign to see this option in Advanced Options.

    Click OK to create the new label (My Label).

    Figure 16-19. Create label

    graphics/16fig19.gif

  8. You will see a message indicating that the label was successfully created. Click OK .

    Figure 16-20. My Label successfully created

    graphics/16fig20.gif

  9. Click the My Label label.

    Figure 16-21. Select My Label

    graphics/16fig21.gif

  10. Click New Page to create a new page. The new page will be created inside My Label.

    Figure 16-22. New Page creation

    graphics/16fig22.gif

  11. On the Create Label page, enter this information:

    - Title: New Page

    - Layout: two column portal page. Click the + plus sign to see the Advanced Options.

    - Click OK to create the page.

    Figure 16-23. Create new page

    graphics/16fig23.gif

  12. Verify that the page has been successfully created. Click OK .

    Figure 16-24. New page has been created

    graphics/16fig24.jpg

  13. You will now install and add the portlet to the page. Navigate to the link Administration -> Portlets -> Install . Do the following:

    1. Click Browse .

    2. Select the directory c:\LabFiles\RemoteAttach\HelloWorld.war and click Open to select the file.

      Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

    3. Click Next to continue.

    Figure 16-25. Select directory

    graphics/16fig25.gif

  14. Click Try Again if you get the no Internet access message. Internet access is not needed.

  15. Verify that you are installing the HelloWorld portlet and click Install to continue the portlet installation. This step may take some time.

    Figure 16-26. Portlet install

    graphics/16fig26.gif

  16. Once the installation is complete, the message Portlets were Successfully installed appears at the bottom of the page.

    Figure 16-27. Successful install message

    graphics/16fig27.gif

  17. To add the Hello World portlet to My Label -> New Page , do the following:

    1. Navigate to Administration -> Portal User Interface -> Manage pages .

    2. Select the labels My Portal -> My Label .

    3. You should see the page New Page (inside My Portal -> My Label ).

    4. Click the Edit Page Layout icon (looks like a pencil) on the right of New Page.

      Figure 16-28. Edit Page Layout

      graphics/16fig28.gif

    5. Click Add portlets on the left column in the portal page.

      Figure 16-29. Add portlets

      graphics/16fig29.gif

    6. Enter HelloWorld in the Search for field and click Search . The Hello World portlet should appear in the result list.

    7. Click the checkbox on the left of the HelloWorld portlet to select the portlet.

    8. Click OK .

    9. Click Done .

  18. Navigate to My Portal -> My Label -> New Page to verify that the portlet appears on the page.

Figure 16-30. New Page with installed HelloWorld portlet

graphics/16fig30.gif

 < Day Day Up > 


IBM WebSphere Portal V5 A Guide for Portlet Application Development
IBM Websphere Portal V5: A Guide for Portlet Application Development
ISBN: 0738498513
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net