The Eclipse Portal Pack provides a set of plugins that help you to develop JSR 168/286 Portlets and deploy them on supported portlet containers.
There are three plugins available in the Eclipse Portal Pack.
JSR 168/286 Portlet Builder — This plugin allows you to create a JSR 168/286 portlet project using the wizards available in the Eclipse IDE. Once you create a portlet project using the wizards, the Eclipse Portal Pack plugin creates the appropriate class files and updates the portlet.xml file. In addition, the plugin provides a build.xml file that allows you to build a WAR, which you can deploy on any portal.
WebSynergy — This plugin registers the Project WebSynergy that runs on GlassFish server in Eclipse IDE, as a Server Runtime. Currently, the WebSynergy plugin allows you to start and stop the Project WebSynergy (GlassFish server) from within the IDE using the generic server framework in Eclipse.
OpenPortal Portlet Container — This plugin registers the OpenPortal Portlet Container 2.0 that runs on GlassFish server in Eclipse IDE, as a Server Runtime. Currently, the OpenPortal Portlet Container plugin allows you to start and stop the Portlet Container (GlassFish server) from within the IDE using the generic server framework in Eclipse.
You need to install the Eclipse Portal Pack to use the plugins and develop and deploy portlets.
Download Eclipse Portal Pack from the Eclipse Portal Pack download page.
Unzip the Eclipse Portal Pack.
Copy the .jar files to the ECLIPSE_HOME\plugins directory.
(Optional) — Restart Eclipse, only if it is running while you copy the .jar files.
This section explains how to use the Eclipse Portal Pack and the plugins in Project WebSynergy. You need to perform the following tasks before using the Eclipse Portal Pack.
Creating Runtime and Server for Project WebSynergy
Creating a Runtime and Server for OpenPortal Portlet Container 2.0
You need to create a runtime and server for Eclipse Portal Pack in order to deploy it on Project WebSynergy.
On Eclipse IDE, click the Window menu and select Preferences.
The Preferences window appears.
From the left pane, click Installed Runtimes.
The Installed Server Runtime Environments appear on the right pane.
Click Add.
The New Server Runtime window appears. In this window, you can choose the runtime environment for a newly installed server.
From the available runtime types, expand Sun Microsystems Inc and select WebSynergy. Select the Also create new local server check box.
Click Next.
Enter the JRE name, GlassFish Home directory, and the Domain Name information for Project WebSynergy.
These details are useful to create a runtime for Project WebSynergy.
Click Next.
Enter the server address, server port, and the debug port information for Project WebSynergy.
Click Finish.
The Project WebSynergy server is created.
You need to create a runtime and server for Eclipse Portal Pack in order to deploy it on OpenPortal Portlet Container 2.0.
On Eclipse IDE, click the Window menu and select Preferences.
The Preferences window appears.
From the left pane, click Installed Runtimes.
The Installed Server Runtime Environments appear on the right pane.
Click Add.
The New Server Runtime window appears. In this window, you can choose the runtime environment for a newly installed server.
From the available runtime types, expand Sun Microsystems Inc and select OpenPortal Portlet Container 2.0. Select the Also create new local server check box.
Click Next.
Enter the JRE name, GlassFish Home directory, and the Domain Name information for OpenPortal Portlet Container 2.0.
These details are useful to create a runtime for OpenPortal Portlet Container 2.0.
Click Next.
Enter the server address, server port, and the debug port information for OpenPortal Portlet Container 2.0.
Click Finish.
The OpenPortal Portlet Container 2.0 server is created.
You can use the plugins in Eclipse Portal Pack to create and deploy portlets on Project WebSynergy. This section explains how to create and deploy portlets on Project WebSynergy using the Eclipse Portal Pack plugins.
On Eclipse IDE, click the File menu and select New. Form New, choose Dynamic Web Project.
The New Dynamic Web Project window appears.
In the New Dynamic Web Project window, enter a name for your project, choose WebSynergy or OpenPortal Portlet Container 2.0 as project runtime, and select Portlet 1.0 or 2.0 support as the configuration.
If Portlet 2.0 configuration is not available in the list, you need to manually add the configuration. To do this, click Modify, select Portal Pack and click Save.
Click Finish.
A new web project is created.
To add a portlet to the web project, click the File menu. From the options, select New and click Other.
The New window to create a Java portlet appears.
From the list of Wizards, expand the Portlet wizard and click Java Portlet.
Click Next.
The Create a Portlet Class window appears.
Enter the details of the portlet that you want to generate.
Click Finish.
A portlet class is created and an entry about the portlet is created in the portlet.xml file.
To deploy the portlet, right click on the name of the portlet, select Run As, and click Run On Server. Accept the default values.
This action deploys the portlet web application and starts the target server, which is either WebSynergy or OpenPortal Portlet Container.