To test, debug, or profile a portlet project within the workbench,
you must first define a local portal test environment server.
Additional options for local 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 which are listed below
- Select to use administration portlets
in the test environment. Administration portlets are portlets provided by WebSphere Portal
to provide administrative functions, such as portlet installation and configuration.
Enable this option only when necessary. It slows down the startup of the test
environment. Even when you have enabled the administration portlets, there
are limitations. You cannot install portlets using the administration portlets.
In addition, most changes that you make are reset to the default values the
next time you start the test environment. To debug portlets in a particular
layout, use the test and debug options of a portal project, not the administration
portlets in the test environment.When you run
cooperative portlet projects that use the JSR 168 portlet API, you must enable
this option so that you can use the wiring tool.
- Select 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.
- Select
to redirect log entries to the console. Otherwise, the log entries are written
to the <product_installation_root>/runtimes/portal_vXX/log directory,
where product_installation_root is the directory where the workbench
is installed and XX is the version of the WebSphere Portal Test Environment.
Enable console logging is initially disabled.
- Select to test portlets in the not-logged-in state.
- Enter JAR file or folder names in the section to make the JAR files or the files in the folder available
to the server. In addition, to make your project compile with the same JAR
files, you must add the JAR files to the Java™ Build Path for your project. To add
JAR files to your Java Build Path, follow these steps:
- In the Project Explorer view, highlight the portlet project.
- Right-click and select Properties.
- Select .
- Add the required JAR files and click OK.
Save the changes to your server configuration by pressing Ctrl
+ S.
Note: An EAR project named wps is
created when you run a portlet in the test environment (Run on
Server or Debug on Server). If you plan
to test or debug your portlet project locally, do not modify the wps project
once it is created. When creating a project, do not name it wps.