Configuring local servers for testing portlets
When defining a local (Test Environment) server for testing, debugging or profiling a portlet project, create and configure the server.
To use a local WebSphere Portal v5.0 server, install the WebSphere Portal v5.0 Test Environment from the Rational Developer launchpad. To use a local WebSphere Portal v5.1 server, install the WebSphere Portal v5.1 Test Environment using the WebSphere Portal 5.1 CD-ROM provided with Rational Developer. Before using the server, configure Rational Developer to use the WebSphere Portal v5.1 Test Environment. See Configuring the WebSphere Portal 5.1 Test Environment.
Follow the instructions below to create and configure a local server:
- Open the New server wizard. See Defining servers for testing portals for instructions.
- Select localhost as the Host name.
- Select a WebSphere Portal Test Environment server from the server type list.
- Select Next.
- On the WebSphere Server Configuration Settings page, select one of the following values:
- Select Use default port numbers and set the HTTP port number to use the default HTTP port.
- Select Use consecutive port numbers and set the First port number to use port numbers other than the default numbers used by WebSphere Application Server. This setting causes the Test Environment to use sequential port numbers, starting with the number you specify. You must specify a port number that begins a range of port numbers that are not being used by another application. This option allows you to have an external Portal server or WebSphere Application Server running on your system, and allows the Test Environment to use different port numbers. You can also configure the Test Environment server's HTTP port numbers by editing the server configuration, as explained below.
- Click Finish 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 Enable base portlets for portal administration and customization to use administration portlets in the Test Environment. Use 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 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.
- Select Enable console logging to redirect log entries to the console. Otherwise, the log entries are written to the <product_installation_root>/runtimes/portal_vXX/logdirectory, 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 Enable anonymous user access to test portlets in the not logged in state.
- Enter JAR file or folder names in the Shared Library 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, add the JAR files to the Java Build Path for your project. To add JAR files to your Java Build Path,...
- In the Project Explorer view, highlight the portlet project.
- Right-click and select Properties.
- Select Java Build Path > Libraries.
- Add the required JAR files and click OK.
An EAR project named wps is created when a test environment configuration is saved and a portal project exists in workspace. If you plan to test, debug, or profile your portal project locally, do not modify the wps project once it is created. When creating a project, do not name it wps.
Related tasks
Defining servers for testing portlets
Associating servers with projects
Configuring the WebSphere Portal 5.1 Test Environment
Enabling transcoding
Referring to other projects
Configuring remote servers for testing portlets