Building JSP/HTML Portlets

You can use the Portlet Wizard to build a portlet that points to a JSP or HTML file for its content. These types of portlets can be simple to implement and deploy, and provide basic functionality without a lot of complexity. However, business logic and presentation layer can get combined in the JSPs; as the application grows, this often leads to escalating maintenance costs while trying to update the webapp and share code. This type of portlet is not well suited for advanced portlet navigation.

There are several ways to invoke the Portlet Wizard, as explained in the topic Creating Portlets. One way is to right-mouse click on your JSP file and select Generate Portlet... from the menu.

The Portlet Wizard displays a Details screen, as shown in this example:

On this wizard dialog, the values for the Title and the Content URI (location of the JSP) are probably already filled in for you. You can specify additional options, such as whether the portlet should have Help and Edit icons. If you want those features on your portlet, specify the path to the JSP page that will provide the Help and Edit functions.

When you are ready, click the Finish button. A <portlet-name>.portlet file will be created for you, by default in the same directory as the content file.

Related Topics

Creating Portlets