O'Reilly logo

GateIn Cookbook by Piergiorgio Lucidi, Luca Stancapiano, Ken Finnigan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a portlet with the Portlet 2.0 Specification

This recipe will guide you through the process of creating a basic portlet that conforms to the Portlet 2.0 Specification. Once created, we will deploy the portlet into GateIn to see the result.

Getting ready

The following are required for this recipe:

  • Apache Maven
  • An IDE of your choice
  • GateIn-3.2.0.Final

How to do it...

To create a simple portlet based on the Portlet 2.0 Specification:

  1. Create a new Maven project within your IDE, specifying Group ID: gatein.cookbook, Artifact ID: chapter6, and Packaging: war.
  2. Inside the project's pom.xml, add the following dependency:
     <dependency> <groupId>javax.portlet</groupId> <artifactId>portlet-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required