Thursday Jan 11, 2007
Thursday Jan 11, 2007
Thanks to the article by Vihang Pathak and Satya Ranjan on Portlets under Technical Articles of Sun Developer Network page. I thought, I will post my version of the above notes, which I had published internally.
Netbeans 5.5 has a Portlet Plugin, which can be tested within a Portlet Container running on an Appserver. Once you have a framework, it will be very easy for you to add java code into the portlet - be it for JCAPs or any other application, and test it locally before deploying it (war file) to the server. Sun Java Enterprise Studio also provide a Portlet creation and Portlet container facility.
1. Download and Install Netbeans 5.5 enviorment http://www.netbeans.info/downloads/index.php
2. Upgrade the installation with the Netbeans 5.5 enterprise pack. It has the BPEL, Webservices, SOA and other latest add-ons packs
Download location - http://www.netbeans.info/downloads/index.php?rs=11&p=6
3. We need to install a Portlet Container into an Appserver environment for deploying and testing the portlets from Netbeans. For that you will need the Java Application Platform SDK Update 2. This can be downloaded and installed from here. This is an Enterprise development environment for Java EE 5, Access Manager, JBI, and the portlet container. The Sun Application server 9 PE update 1 will also get installed with the installation of the pack. After running the installer, the kit gets installed under C:\Sun\SDK. The appserver gets installed here. Make sure to select the Portlet container during the installation.
Download location for Application Platform SDK- http://java.sun.com/javaee/downloads/index.jsp. You can get more information on Portlet containers - (Portlet 1.0 Beta) from this PAGE.
4. Next you need to add the Netbeans Portlet Plugin. For this, you will be updating Netbeans 5.5 manually. The '.nbm' files required for the manual upgrade is available from the zip files that can be downloaded from this location. Instruction for adding the plugin is shown HERE.
5. After installing the Netbeans Plugin, you will see the Portlet Container - "Open Source Portlet Container" showing up as additional server in the list of Servers in Netbeans. ( May need to restart to the IDE). After creating the portlet project, make sure to change the server to "Open Source Portlet Container" by right clicking Project Properties page and going down to the run option.
The following article will help you develop and run a Netbeans HelloWorldPortlet. http://java.sun.com/developer/technicalArticles/J2EE/sdk_nbportletplugin/