How to register a iWidget for use on Portal Mashup Page

YOu have two options to use iWidget in Portal 7.0, one either you can wrap a iWidget into portlet and then add the wrapped portlet on a portal page or you can use iWidget on the portal mash up page.

I wanted to add the widget on the Mashup Page inside the portal so these are the steps that i followed for that

  1. First install the J2EE application that contains the widgets as .war file using WAS Admin Console, while installing select WebSphere Portal as the server. Take a note of the context root of the web application

  2. Once the J2EE application is installed start the application

  3. After installing web application make sure that you can view the widget.xml files by going to the url


  4. Once the application is installed you should register it with the the portal by executing the following configuration task

    ConfigEngine.sh|bat register-mashup-module
    -DApplicationName='SampleIWidgetJ2EEApp_war'
    -DWasPassword=wasadmin
    -DPortalAdminPwd=wasadmin

    In my case the SampleIWidgetJ2EEApp_war is name of the application

  5. Next step is to change the catalog.xml file for for the toolbox to add name of the newly installed widget. To do that first you should copy the \WebSphere\PortalServer\base\wp.mmi.deploy\config\binaries\catalogs\catalog_default.xml file somewhere on your machine say c:/work.

  6. Then you should add one entry each for each of the widget like this

    <entry id="helloIWidget" unique-name="helloIWidget">
    <title>
    <!--@feedreader.title@-->
    <nls-string lang="en">Hello World iWidget</nls-string>
    </title>
    <description>
    <!--@feedreader.description@-->
    <nls-string lang="en">Displays content from a specified feed URL</nls-string>
    </description>
    <definition>/sampleiwidget/HelloWorldIWidget.xml</definition>
    <content>http://www.webspherenotes.com</content>
    <preview>http://www.webspherenotes.com</preview>
    <icon>/feedReader/feedreader.png</icon>
    <metadata name="com.ibm.lotus.widget.renderer">priority</metadata>
    </entry>

    Add the entry under the category where you want it to appear.

  7. Once the mycatalog.xml file is modified with your widget definition, you can register it with was by executing following configuration task

    ConfigEngine.bat import-config-fil
    e -DMMImportFile=c:\work\mycatalog.xml -DMMImportFilePropertyName="mashups.catal
    og_default.xml"


  8. Now restart the portal server and when you try to access the Mashup page you should be able to see the HelloWorldiWidget widget added to Demo category, you can drag and drop it on the mashup page


2 comments:

durga said...

Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.


How to Register a Business

Abhi said...

Thanks for info
Web Design Company in Bangalore
Website development in Bangalore