Purpose:
Set up an environment for developing and debugging portlets from under Windows XP.
Run the first portlet application and understand that the installation was successful.
Note:
Avoid Russian letters in the folder name, the user name from which you are working should not be Russian. NetBinz can not read Cyrillic, there will be big problems.
Application installation
1. Install
NetBeans :
It is better to download the full version for future work with web services. Be sure to have
bundled GlassFish
')
2. Download
portlet-container-configurator.jar :
Run and specify the path to the installed GlassFish server

3.Download
PortalPack :
Unzip the plugins to a folder.
4. Install the downloaded plugins in NetBinze:
Tools ->
Plugins ->
Downloaded tab ->
Add Plugins Button
...Select downloaded plugins and install them.
5. Restart NetBinz
6. Configure the portlet container in NetBinze (a la
“integrate” ).
Go to
Tools -> Servers ->
Add Server button
...Select from the list on the right OpenPortal Container the desired version (now there are 1.0 and 2.0)
7. In the form that appears, enter the following data:
specify the path to the installed GlassFish.
Usually, the path to the domain with PortletDriver is automatically determined after specifying the path to the server.
Enter the password and login administrator. (default admin: adminadmin)

8. Reload netBinz
Running the notorious HelloWorld
I promise, the next example of power and strength
(this is such a little joke) portlets will be 100 million times more interesting.
1. Create a project
File ->
New project ->
Web ->
Web ApplicationSpecify the project name, where it is stored on disk.
In the next dialog for setting the runtime and application environment, select the OpenPortal Portlet Container server,
as well as the
Java EE version.
In the next framework selection dialog, check
Portlet Support , select the portlet version: 1 = JSR168, 2 = JSR286.
Specify the name of the portlet class, its name, etc.
Note that if you installed the portlet container version 1.0, then the JSR286 portlets should not work there.
2. Run application
On the left, in the
Projects tab, right-click on the project. Choose
Clean and build , and then
Undeploy and deploy .
During the first action, the application will be compiled into a war file, after the second, the application will be uploaded to the server directly to the portlet container.
The same recipe can be used when updating the application you are working on. After the operation Deploy and undeploy, the changes should take effect.
The installed application can be found at:
localhost : 8080 / portletdriver /
The portlets installed on the server will appear on the portlets tab.
If the application is not in the container, check if the portlet container is installed as a server for the application:
To do this, click the right button on the project and select from the drop-down list Properties.
Note:In
OpenPortal Container 2.0, portlets written for the JSR-168 and JSR-286 specifications start and run.
Portlets that use the Inter Portlet Communication (IPC) API are displayed, but they do not exchange events. The IPC mechanism for JSR 168 is supported in Sun Java System Portal Server 7.1 and in OpenPortal Container 1.0. OpenPortal Container 2.0 has its own IPC mechanism. It will also work on the Portal Server version 7.2
Useful links :
Portlet Creation and Deploymentsample list wiki pageCreating the NetBeans IDE Portlets for Web SitesFrom the author, I mean:
After suffering with RAD and TE, I was pleasantly surprised, because setting up an IBM environment for developing and debugging web applications, including portlet applications, takes almost two working days. NetBinz is configured and installed in 10 minutes.