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

Getting started with WebUI

In this recipe, you will see how to add a new configuration to the portlet so that you can use the WebUI extensions.

Getting ready

To extend the portlet, you need to create a new XML configuration file for WebUI, add the path of this file in the init parameters of your portlet.xml file, and modify your portlet class.

How to do it...

Here are the basic steps to create a WebUI in an existing project:

  1. Create the WebUI file. In the WEB-INF folder of your web application, create a folder named /conf/portlet followed by the name of the web application, then the name of the portlet and the path /webui/configuration.xml: MyApplication.war/WEB-INF/conf/portlet/MyApplication/MyPortlet/webui/configuration.xml

    Here is a basic example ...

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