Testing portlets on remote servers

You can test one or more portlet projects using a remote WebSphere® Portal Server Attach server.

When portlets are published to a server attach server, a Portlet Preview page is created on the remote server. Each portlet is placed on its own page under the Portlet Preview page. Each portlet's page is named user/portletname where user is the user ID that is defined in the server attach server configuration, and portletname is the portlet project name.

In the previous versions of WebSphere Studio, this function was called portlet preview.

To test a portlet project on a remote server:

  1. Configure the remote server.
  2. From the Project Explorer view, highlight a portlet project and select Run > Run on Server.
  3. To use an existing server definition, select Choose an existing server and choose a WebSphere Portal Server Attach server from the list.

    To define a new remote test server, see Defining remote servers for testing portlets.

  4. Click Finish. After the server starts and the portlet is deployed, the Web browser that you defined opens to the URL of the portlet page on the remote server.
  5. Optionally, uninstall the portlet.
Note: If multiple users are testing portlets on the same server, ensure that the UIDs of the portlets are unique. Otherwise, when the portlet is installed on the server, it may replace the original portlet using that UID. To modify the UID of a portlet:
  • For the IBM® portlet API, modify the UID using the portlet deployment descriptor editor. Refer to Customizing IBM API portlets
  • For the JSR 168 portlet API, the UID is constructed using the id attribute of the portlet-app element. If the id attribute is not specified, the UID is generated automatically using the login user ID and project name.

For more information about UIDs, refer to Guidelines for portlet application UIDs in the WebSphere Portal Information Center.

Note: An XML exception occurs and the server attach fails to start if the project name, the filename, the file directory structure, or the User ID for WebSphere Portal login name is excessively long. To correct this, shorten the length of the filename, the file directory structure, or the User ID for WebSphere Portal login on the WebSphere Portal server attach server configuration.
Related tasks
Configuring remote WebSphere Portal servers for testing and debugging
Resetting portlets on remote servers
Defining Web browsers and device emulators
Associating servers with projects
Testing portlets on local servers

(C) Copyright IBM Corporation 2002, 2005. All Rights Reserved.