Defining remote servers for testing portlets

To test or debug a portlet project on a remote portal server, you must first define a portal server attach server. You may also need to do further configuration on the remote server.
  1. In the Server view, right-click and select New > Server.
  2. Provide the host name of the remote WebSphere® Portal server.
  3. Select a WebSphere Portal Server Attach server from the server type list. Click Next.
  4. On the Server Ports page, define the following options:
    1. Set the JVM debug port, which defaults to 7777.
    2. Set the HTTP port, which defaults to 9081.
    3. Optionally, select Enable JavaScript debugging and set the BSF debug port, which defaults to 4444.
    4. Select Automatically switch to Debug perspective if you want to switch to that perspective when using this server.
  5. Click Next. On the WebSphere Portal Settings page, define the following options:
    1. Define the WebSphere Portal Base URI, which defaults to /wps.
    2. Define the WebSphere Portal Default page, which defaults to /portal .
    3. Define the WebSphere Portal Personalized homepage, which defaults to /myportal.
    4. Leave the WebSphere Portal Install location blank. It is used for portal projects, not portlet projects.
    5. Select Enable WebSphere security if security is enabled on the remote server.
    6. Provide an administrator ID and password for a WebSphere Portal administrator.
    7. If Enable automatic login is selected, provide a user ID and password for a WebSphere Portal user. The user must be created manually on the Portal Administration page on the remote server before testing or debugging. Edit permission will be automatically assigned to the user. The user ID will also be used as part of the label. To use a single WebSphere Portal server for multiple users, you should use a different user ID for each person.
  6. Click Next. Entries on the Publishing Settings page do not need to be set for portlet projects. They are for portal projects.
  7. Click Next. On the Add and Remove Projects page, select one or more projects and select the Add or Remove button to associate or disassociate the project with the server. During publishing, all projects associated with the publishing server are deployed.
  8. Click Finish.
Additional options for remote servers can be viewed and changed by double-clicking on the server in the Servers view. This opens the server configuration editor. You can change any of the settings that were defined previously. In addition, the Portal tab has additional settings for Portal and Portlet Publishing.
Set these values for Portal Publishing:
  1. Select Deploy portlet projects when running or debugging to automatically deploy when using Run on Server or Debug on Server.
  2. Provide a Label title if you want to override the default value, PortletPreview. When you run or debug a portal project, the label is automatically created if the specified label does not exist. Testing or debugging sets the user permission level to access the label even if the label was already created and the current permission level is not adequate. The original permission level is restored with the Reset Portlets action.
  3. Change the Label ordinal if you want to override the default value of 20. The ordinal attribute specifies the sorting order of portal resources. For information on the ordinal attributes, refer to "Special configuration data entries" in the Information Center of WebSphere Portal.
  4. Select Enable multiple pages when deploying portlet projects to allow different portlet projects to use different pages in the portal during testing. By default, multiple pages are enabled. Each portlet project that is associated with a single server will be deployed to a different page. If you want to deploy them all into a single page on the server, you can disable multiple pages when deploying portlet projects.
Set these values for Portlet Publishing:
  1. Select Deploy portal projects when running or debugging to automatically deploy when using Run on Server or Debug on Server.
  2. Provide the installation location for the remote WebSphere Portal server.

In addition, under Basic Options, there is a check box to Enable anonymous user access. This option is to test portlet(s) in the not-logged-in state.

Save the changes to your server configuration by pressing Ctrl + S.

Related tasks
Configuring remote WebSphere Portal servers for testing and debugging
Defining local servers for testing portlets
Optimizing JSP file testing

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