Portal
Pack Plugins Frequently Asked Questions
About this Guide
This guide is intended to help portlet developers to get acquainted
with Portal Pack plug-ins for Netbeans IDE.
What is Portal Pack ?
Portal Pack has a set of plugins for Netbeans IDE which
provide portlet development and deployment support inside Netbeans
IDE. To use Pack 2.x plug-ins, you need to use NetBeans 6.x IDE.
Portal Pack 1.x plug-ins work with NetBeans 5.5.x IDE.
Configuration steps
to configure a
Portlet Container in Netbeans
To configure a new Portlet Container Instance in
Netbeans IDE
- $sdk_home, if you are using bundled Portlet Container with
Application Platform SDK
- Glass Fish/Sun Java System Application Server 9 installation
directory, if you are
using stand alone Portlet Container downloaded from
https://portlet-container.dev.java.net
-
Enter Domain Dir as "$GlassFish Home/domains/$domain". Click on
the browse button to select Domain Dir. Default domain is "domain1"
-
Enter GlassFish/Sun Java System Application Server 9 admin
password. Default
password is "adminadmin"
- Click on "Next"
- $sdk_home/domains/$domain/portlet-container, if
you are
using bundled Portlet Container with Application Platform SDK.
- $glassfish_home/domains/$domain/portlet-container, if you are
using
stand alone Portlet Container deployed on Glassfish.
Create a JSR 168/286
based Portlet Application
Using this plugin one can create JSR
168/286
based portlet application and can add JSR 168/286 portlets to an
existing
portlet application. This functionality is supported by "Generic
Portlet" module of
Portal Pack plugin . In order to create a
new JSR 168/286 Portlet Application
In
NetBeans 6.x IDE
Unlike earlier versions of NetBeans,
in NetBeans 6.x IDE Portal Pack provides portlet support through
web framework. In NetBeans 6.x you can add portlet support to an
existing/new web application by adding "Portlet Support" framework.
To create a new web application with the
Portlet Support
- Click New Projects > Web > Web Application.
- Enter all project related informations.
- In "Frameworks" panel, select "Portlet Support" framework. Select
"Create Portlet" check box to create a default portlet in the new
application.
- Select Portlet Vesion. (1.0 for JSR 168 and 2.0 for JSR 286)
In
NetBeans 5.5/5.5.1 IDE
-
Click New Projects > Portlet Application > JSR 168 Portlet
Application
-
To create a new portlet in a Portlet Application right click on
Project.
-
Select New > File Folder > Portlets > JSR168 Portlet
How
to Create a JSF Portlet
You can create JSF based portlet in NetBeans 6.1 IDE using Portal
Pack 2.0.
To create a JSF Based Portlet
- Create a New WebApplication with/without Portlet support
framework. Don't Select "Visual Java Server Faces" framework.
- Right click on the project node. Select New > Visual Web JSF
Portlet Page
- Enter JSF Portlet Page name
- This will create a JSF Portlet Page. You can now drag and drop
Visual Web Components and design you JSF Page inside NetBeans IDE.
How
to Set VIEW/EDIT/HELP page of a JSF Portlet
- Right click on a Visual Web JSF Portlet jsp page node
- Select "Set as Initial"
- Set the page as initial page for VIEW/EDIT/HELP mode
Select Target Server
as Portlet Container
User can select a particular target server for
a Portlet Application project from a list of all configured servers. By
doing so deployment/undeployment can be done on the selected target
server.
-
Right click on the project node.
-
Click "Properties" in pop up menu.
-
Select "Run"
-
Select Target Server as "Open Source Portlet Container"
Deploy Portlet
Application
If you have already configured a Portlet
Container instance inside your Netbeans IDE and your project is ready
to deploy, then follow below steps to deploy your portlet
application on Portlet Container.
Note: "Run" option in pop-up menu of project doesnot work for Portlet
type application.
View Single Portlet
While developing portlet application inside
Netbeans IDE, developer can deploy and see the output of a single
deployed portlet
-
Go to Runtime window
- Go to Server
-
Expand target "Open Source Portlet Container" instance.
-
Expand it further to see list of deployed portlets.
-
Right click on a single portlet and select "Show Portlet".
View All portlets /
Admin Tool
If you want to see the output of all the portlets
deployed on the Portlet Container
Issues
Though following issue has been resolved in the
current version of the binary available for download, you may face this
problem if you have an old binary of the plugin.
Description :
Incorrect "context" (hardcoded
/mypath) for a portlet application which results
deloyment failure for a portlet
application.
It occurs if you select the run time target server
of a portlet application as "Sun Java System Application Server" and
then switch back to
"Open Source Portlet Container". Due to this an
incorrect context(/mypath) is set in sun-web.xml which results an
error in deployment.
To check context of your portlet application
- Right click on Project node in Project window
- Select "Properties" in pop up menu
- Select "Run" in pop up dialog
- Check the value of "Context Path"
- Everything is ok if the context path is either
"/[portletapplicationname]" or blank .
To fix the issue if you have context path set to "/mypath"
- Delete <context-root> from sun-web.xml if exists
This issue is fixed in the current downloadable
binary. So it's recommended to download/install currently available
binary.