Debugging portlets on remote servers

To debug a portlet project on a remote server, you will use a remote portal server attach server. It is recommended that you debug portlets on a local server rather than a remote server.

The process of debugging a portlet application is exactly the same as for a Web application. You can control and trace the execution of the portlet. You can set the break points in the Java™ source code and the JSP files.

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.

To debug the portlet on a remote server:

  1. Configure debug mode on the remote server.
  2. In the Project Explorer view, right-click the portlet project and select Debug > Debug on Server. The Server Selection panel appears.
  3. Select an existing WebSphere® Portal server attach server definition or create a new server.
  4. Click Finish. The project is published to the WebSphere Portal server attach server. The Web browser is launched automatically. By default, the Debug perspective opens. You can disable automatic switching to the Debug perspective by deselecting theAutomatically switch to Debug Perspective check box when you create a new server attach server, or by editing the configuration of a server you have already defined..
  5. Optionally, uninstall the portlet.
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.
Restrictions: To debug the following kinds of portlet applications, remote debugging is the only option:
  • Personalized portlet applications. Refer to Troubleshooting, for more information.
  • Portlet applications that require components that are not included in the runtime environment supported by the workbench and must be installed on WebSphere Application Server.
Related tasks
Defining remote servers for testing portlets
Defining Web browsers and device emulators
Configuring remote WebSphere Portal servers for testing and debugging
Debugging portlets on local servers
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.