![Page 1: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/1.jpg)
Script Portlet
Installation and Configuration with
Websphere Portal v8.5
Adinarayana H
![Page 2: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/2.jpg)
Table Of Contents
1. Script Portlet Overview
2. Script Portlet Download Process
3. Script Portlet Installation with Websphere Portal
4. Script Portlet Deployment to a Page
5. Script Portlet Installation on Virtual Portal
5.1 Export/Import of WCM Library and Export/Import of DnD page
5.2 Running deploy-paa command
6. Script Portlet Development Example
![Page 3: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/3.jpg)
1. Script Portlet Overview
The IBM Script Portlet enables a script developer to create portlets for IBM WebSphere Portal with HTML, JavaScript, and CSS.
The following key WebSphere Portal and IBM Web Content Manager features are available with the Script Portlet:
Content targeting based on devices or locations Access to user login information Adaptive design that uses conditional rendering Access to shared render parameters, portlet preferences, and live text
The Script Portlet has the following advantages:
Users have more autonomy and less dependence on central IT for portlet development, which decreases the time to market.
Users need less skill to be productive WebSphere Portal developers. Users control access and workflow processes in enterprise settings. Users can create reusable assets and contents. Users can render existing portlets, such as those developed with IBM Web Experience Factory or
IBM Rational Application Developer, on a page with portlets by using Script Portlet.
*As mentioned in Knowledge Center
![Page 4: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/4.jpg)
2. Script Portlet Download Process
Download Script Portlet 1.3 from Greenhouse,
https://greenhouse.lotus.com/plugins/plugincatalog.nsf/assetDetails.xsp?action=editDocument&doc
umentId=DDB5C467D991413285257C67002476E0
Scriptportlet.zip file contains scriptportlet-app.1.3.0.paa which needs to be installed in Websphere
Portal v8.5.
![Page 5: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/5.jpg)
3. Script Portlet Installation with Websphere Portal
Navigate to Portal server profile Configengine folder and issue the bloe command to start Script Portlet
Installation.
Script Portlet Can be installed on Base Portal or it can be deployed on Virtual Portal.
Base Portal Installation process
Configengine command will be executed twice, for Install and then Deploy
ConfigEngine.bat install-paa -DPAALocation=C:\Portal85\Scriptportlet\scriptportlet-app-1.3.0.paa -
DWasPassword=wpadmin -DPortalAdminPwd=wpadmin
![Page 6: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/6.jpg)
Make sure that Build Successful message is seen after running the command.
Execute below command for deploying Script Portlet
ConfigEngine.bat deploy-paa -DappName=scriptportlet-app -DWasPassword=wpadmin -
DPortalAdminPwd=wpadmin
![Page 7: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/7.jpg)
Exclude Script Portlet from Portal Development Mode Applications list,
Navigate to <path to wp_profile>/PortalServer/config/StartupPerformance/
And edit wp.base_TargetMapExclList.properties file.
Include scriptportlet at the end of the line in the file.
Restart Websphere Portal Server.
![Page 8: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/8.jpg)
4. Script Portlet Deployment to a Page
Navigate to Websphere Portal Admin console and create a new page.
Page name: scriptportletpage
Make sure that Edit mode is ON. Click on Toolbar and then click on Create for the scriptportlet page.
Select Applications Select Web Content Click on Script Portlet
![Page 9: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/9.jpg)
Click on Add To Page
![Page 10: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/10.jpg)
Following message will be displayed after successfully adding Script portlet to the page.
Below screenshot shows Script Portlet being added to the page.
![Page 11: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/11.jpg)
Right Click on the Icon and Maximize the Portlet.
Click on Edit to edit the Script Portlet in order to start writing new code.
![Page 12: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/12.jpg)
There will be three tabs to start writing the HTML, CSS and Javascript code.
A sample HTML tag is written to show the page. Two panes will be displayed, One to write the code and
other to see the output. Click on Save after completing the Code.
![Page 13: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/13.jpg)
Output will be displayed as well. Switch off Edit Mode and Portlet Data will be displayed.
Screenshot below after disabling Edit mode,
![Page 14: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/14.jpg)
Scriptportlet is the WCM Library which will be used internally to handle all the content.
![Page 15: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/15.jpg)
5. Script Portlet Installation on Virtual Portal
Create a new Virtual Portal.
Assigning Script Portlet to a Virtual Portal can be done 2 ways,
5.1 Export/Import of WCM Library and Export/Import of DnD page
5.2 Running deploy-paa task
![Page 16: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/16.jpg)
5.1 Export/Import of WCM Library and Export/Import of DnD page
Export WCM Library Scriptportlet using below command running from PortalServer Profile Configengine
directory.
ConfigEngine.bat export-wcm-data -DWasPassword=wpadmin -DPortalAdminPwd=wpadmin -
Dexport.libraryname="Script Portlet Library" -Dexport.directory=C:\Portal85\Scriptportletlibrary
![Page 17: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/17.jpg)
Import the WCM library using below command,
ConfigEngine.bat import-wcm-data -DWasPassword=wpadmin -DPortalAdminPwd=wpadmin -
Dimport.directory=C:\Portal85\Scriptportletlibrary -DVirtualPortalContext=adminib-mkg0t0h18097
VirtualPortalContext is the Context path given to Virtual Portal.
Make sure that Build Successful message pops up after running the command.
![Page 18: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/18.jpg)
WCM Library displays in Web Content Libraries of Virtual Portal.
We need to Export DnD page and Import the page in Virtual Portal. DnD configuration page will be
present in Content Root Hidden Pages
![Page 19: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/19.jpg)
Click on Export and select NO during export.
DON’T export the entire hiearchy. Click on NO here and save the XML file
pageExport.xml is saved and this XML file will be Imported in Virtual Portal.
![Page 20: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/20.jpg)
Navigate to Virtual Portal and click on Import XML to Import the DnD page XML.
Successful message appaears after Importing the XML file.
![Page 21: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/21.jpg)
Running deploy-paa task
Second way of deploying Script Portlet to Virtual Portal is using deploy-paa command through
Configengine task.
I have created another Virtual Portal and issued the following command,
ConfigEngine.bat deploy-paa -DappName=scriptportlet-app -DWasPassword=wpadmin -
DPortalAdminPwd=wpadmin -DforceDeploy=true -DVirtualPortalContext=virtualportal1
![Page 22: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/22.jpg)
![Page 23: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/23.jpg)
6. Script Portlet Development Example
A simple Javascript Query written using Script Portlet.
HTML to display the button and Text
Javascript Code to trigger the alert
![Page 24: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/24.jpg)
![Page 25: Script Portlet Installation and Configuration with ... · PDF file3. Script Portlet Installation with Websphere Portal Navigate to Portal server profile Configengine folder and issue](https://reader034.vdocument.in/reader034/viewer/2022050712/5aa7ece87f8b9a294b8cadf7/html5/thumbnails/25.jpg)
References
https://greenhouse.lotus.com/plugins/plugincatalog.nsf/assetDetails.xsp?action=editDocument&doc
umentId=DDB5C467D991413285257C67002476E0
http://www-
01.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/welcome/script_welcome.html?lang=en