Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Building an Ajax portlet for WebSphere Portal

Karl Bishop (kfbishop@us.ibm.com), Senior Software Engineer, IBM
Photo: Karl Bishop
Karl Bishop is a Senior Software Engineer on the IBM Web Enablement and Support team. He works from the wilds of North Carolina. Karl works on various internal and external portal-based applications, as well as being a strong proponent of Linux based solutions.
(An IBM developerWorks Contributing Author)
Doug Phillips (dougep@us.ibm.com), Advisory Software Engineer, IBM
Doug Phillips is an Advisory Software Engineer for IBM's elite group of skilled professionals known as IBM's Web Enablement and Support team. He has worked in many organizations within IBM and currently designs and develops both internal and external WebSphere Portal applications using IBM middleware and Linux. Doug is WebSphere and DB2 certified.

Summary:  In our previous article, Using Ajax with WebSphere Portal, we discussed some issues and design concerns when using Ajax in a portal application. In this tutorial, we will put our newfound knowledge to use and create an Ajax portlet application. To make things interesting, we decided to build a portlet that makes heavy use of Ajax and DHTML. This provides you a glimpse into what's possible with this technology, and to also give you a useful tool to browse your databases. While most of the application is already written, it is up to you to fill in the blanks to get things running.

Date:  16 Aug 2006
Level:  Intermediate PDF:  A4 and Letter (2104 KB | 37 pages)Get Adobe® Reader®

Activity:  50326 views
Comments:  

Appendix B. Deploying the portlet

This section provides information on how to deploy a portlet WAR file through RAD with just a few simple clicks.

  1. In the Project Explorer, right-click on the Ajax_and Portal project and select Deploy Portlet... from the menu as shown in Figure 12.

    Figure 12. Deploy Portlet menu option
    Deploy Portlet menu option

  2. Configure a portal server to enable deployment. The first time you run this wizard, there will not be a server configured. If there is not a server configured, then follow these steps, otherwise continue to Step number 3.
    1. Click the New... button to configure a new server. Note: If you have a remote portal server you wish to deploy to, then you either FTP access or a shared directory (for example, NFS). Setting up remote servers is out of the scope of this exercise, and you will need to consult the RAD and WebSphere Portal help documentation.
    2. For a normal portal environment, you will want to select the values shown in Figure 13. Adjust these to match your environment and click Next.

      Figure 13. Deploy and define new server
      Deploy and define new server

    3. Enter the following information. Standard values are shown in Figure 14, but you may have to adjust for your particular deployment. When finished, click Next.

      Figure 14. Deploy portal settings
      Deploy portal settings

    4. Configure the publishing settings. The values shown in Figure 15 are for a local installation on a Linux platform. Adjust these to match your configuration, then click Finish.

      Figure 15. Deploy, publishing settings
      Deploy, publishing settings

  3. Select the appropriate server to deploy your portlet to. Typically, this is localhost > WebSphere Portal v5.1 for Import, Export and Deploy @ localhost, and click Finish. See Figure 16.
  4. If the portlet has been previously deployed, you will receive a pop-up asking to overwrite the existing content. Answer Yes to continue to deploy the changes.

    Figure 16. Deploy, server select
    Deploy, server select

  5. Your portlet should now be deployed on the server!

If this is the first time deploying the portlet, you need to add it to a page on your portal:

  1. Using your Web browser, log into your portal using an administrative account.
  2. [Optional] Create a new page for the portlet.
    1. Select the portal Administration link.
    2. Select Portal User Interface > Manage Pages.
    3. Select My Portal link from the list pages.
    4. Click the New page button.
    5. Provide a name of Ajax and Portal,and customize as you see fit. Then click the OK button, and then OK again.
  3. Add the portlet to a page:
    1. Select the portal Administration link.
    2. Select Portal User Interface > Manage Pages.
    3. Select My Portal link from the list pages.
    4. Click the Edit Page Layout button for your page that you will place your portlet.
    5. Click the Add portlets button.
    6. Search for "Ajax", select the Ajax Database Explorer portlet, and click OK.
    7. Click Done to finish the page edit.

14 of 18 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=153838
TutorialTitle=Building an Ajax portlet for WebSphere Portal
publish-date=08162006
author1-email=kfbishop@us.ibm.com
author1-email-cc=
author2-email=dougep@us.ibm.com
author2-email-cc=