This document presents an overview of JSR 168 Portlet development
features available in MyEclipse.
To get a better feel for MyEclipse and learning more about it,
please check out our product
Documentation for more
In order to create a Portlet project, first it requires you start
wiith an existing MyEclipse Web Project. Then you can add
JSR 168 Portlet Capabilities to it to give it Portlet
support. The Portlet Support includes configured
web.xml (for Portal engines that have this requirement),
portlet.xml, and all necessary JSR 168 runtime
Figure 2.1.1: Add Portlet Capabilities to Web
The Add Portal Capabilities wizard allows selection of the
specific Portal engine to support:
Figure 2.1.2: Portal Capabilities Wizard
Once the Portal Capabilities wizard completes, the Web Project
will be configured with JSR 168 runtime libraries,
web.xml will be configured with necessary configuration,
and a new
portlet.xml file will have been added to the project as
shown in Figure 2.1.3.
Figure 2.1.3: Initial Portlet Project Contents
MyEclipse provides wizards for JSR 168-compliant Portlet
creation. This wizards can be invoked from the File >
New > Other... > MyEclipse > Web category as shown in
Figure 3.1 New MyEclipse Portlet Wizard
This wizard will create the Portlet class and other required (or
optional) resources in addition to registering the new portlet in
portlet.xml descriptor. First page of the wizard
configures the Portlet class and allows the user to select from
the list of predefined Portlet templates:
Figure 3.2 First page of the Portlet wizard
MyEclipse provides following Portlet templates:
Portlet with JSPs - this Portlet delegates all requests
to JSPs corresponding to portlet mode. This allows clearer
separation of the application logic from the UI and to leverage
JSP support provided by MyEclipse IDE.
Simple Portlet - this template will create simple Portlet
class with method stubs for the request handling methods.
Second page of the wizard allows further customize your new
portlet and to specify template-specific portlet settings:
Figure 3.3 Second page of the Portlet wizard
MyEclipse does not current support direct deployment of the
Portal Web Projects directly to a portal server. The reason for
this is that each portlet server out there can have varying
deployment requirements, and at the moment the deployment tool in
MyEclipse doesn't know how to deploy Portlets to those servers.
However, MyEclipse Blue Edition does provide direct portal development
and deployment support for WebSphere Portal Server 6.x. A trial download
of MyEclipse Blue Edition is available here.
To deploy portal application to JSR 168-compatible portal engine
the project should be exported as deployable WAR file.
Figure 4.1 WAR export wizard
The resulting WAR file should be deployed to the portal server
using the server-specific deployment tools or follow the specific
deployment instructions provided by the portlet server.
We would like to hear from you! If you liked this overview, have
some suggestions or even some corrections for us please let us
know. We track all user feedback about our learning material in
Please be sure to let us know which piece of MyEclipse material
you are commenting on so we can quickly pinpoint any issues that