3.2.1. Standard WebApp for Gadget importer

In GateIn 3.5, you can create a WebApp folder to contain the configuration of the list of gadgets which are automatically added to the Application Registry.

This section shows you how to create a WebApp which has a standard structure processed by the Gadget importer. It covers the following topics:

Structure of WebApp

A WebApp should be organized as the following structure:

Necessary files

The WebApp structure consists of two necessary files: web.xml and gadget.xml.

In the web.xml file, there are 2 requirements:






The gadget.xml file is used to locate the configuration of gadgets that you want to add to the Application Registry.

    xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0 http://www.gatein.org/xml/ns/gadgets_1_0"

    <gadget name="To-do">

    <gadget name="Calendar">

    <gadget name="Calculator">

    <gadget name="rssAggregator">

  <gadget name="Currency">

  <gadget name="ServicesManagement">

This file has 3 important tags:

Local gadget resources

For local gadgets, their source and resources should be located in the same folder.

See the example about the To-do gadget:


The Gadget importer service will find a folder that contains the gadget source, then find all resources in the folder and store them into JCR as the resources of the gadget. Therefore, putting the gadget resources in the folder different from the gadget source can cause many unnecessary files to be stored as the resource files of the gadget.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus