Debugging portlets remotely

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.

There are some restrictions on debugging portlets:

Use the following steps to debug the portlet using Server Attach:

  1. Define your default Web browser or device emulator following the instructions in Configuring Web browsers and device emulators.

  2. Turn on debug mode on the remote server using the instructions in Preparing WebSphere Portal for remote testing and debugging.

  3. In the Project Explorer view, right-click the portlet project and select Debug > Debug on Server. The Server Selection panel appears.

  4. Select an existing WebSphere Portal Server Attach server or create a new server. Refer to Defining servers for testing portlets for instructions on creating servers.

  5. Click Finish. The project is published to the WebSphere Portal Server Attach selected. The browser is launched automatically. The debug perspective opens.

  6. You also have the option to manually install the portlet following the steps shown below.

    1. Create a portlet WAR file using these steps:

      1. Right-click the portlet project and select Export > WAR file.

      2. Provide a destination directory for the WAR file.

      3. Click Finish.

    2. Install the WAR file to WebSphere Portal using Portal Administration functions.

    3. Add the portlet to a page container.

  7. Remove the portlets from the Server Attach server by following the instructions in Resetting portlets on remote servers.

For limitations regarding firewalls and Linux, refer to Configuring networks for deployment.

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 at the WebSphere Portal Server Attach server configuration.

 

Related concepts

Debugging portlets

 

Related tasks

Defining servers for testing portlets
Preparing WebSphere Portal for remote testing and debugging
Debugging portals remotely