Debugging portlets locally

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.

During the debugging phase, most changes to portlets are automatically republished to the test environment. However, some changes, such as changing the portlet name, supported markups or supported modes, may require you to restart the server to confirm the resource changes for your portlet projects.

When you debug a portlet on the local test environment server, the default theme and skin are used. To use a customized theme or skin, refer to Testing, debugging, or profiling portals

To debug a portlet application on the Test Environment,...

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

  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 server under localhost or create a new server. Refer to Defining servers for testing portlets for instructions on creating servers.

  4. Click Finish. The project is published in the WebSphere Portal Test Environment selected, and the server is started in the debug mode. The browser is launched automatically with the following URL:
    http://localhost:9081/wps/portal/!ut/p/.cmd/LoginUserNoAuth?userid=wpsadmin&password=wpsadmin
    If you have set breakpoints in your code, and one of them is hit, you will be asked if you wish to open the Debug perspective. To change the behavior of the Debug perspective startup to always open the Debug perspective when a break point is hit, or to never open the Debug perspective when a breakpoint is hit, change the preferences on the Windows > Preferences > Run/Debug page.

 

Related concepts

Debugging portlets

 

Related tasks

Debugging portlets locally
Deploying portlet projects
Defining servers for testing portlets