Overview :- Deploy a sample portlet with the XMLAccess input script shown in listing
Step 1 :- Create DeployPortlet.xml as given below to deploy the portlet ear
<?xml version="1.0" encoding="UTF-8"?>
<request
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="PortalConfig_8.0.0.xsd"
type="update"
create-oids="true">
<portal action="locate">
<web-app action="update" active="true"
uid="SPFStandardStockQuote.war.webmod">
<url>file:///$server_root$/installableApps/NameOfWarFile.war</url>
<portlet-app action="update" active="true"
uid="NameOfWarFile.war">
<access-control externalized="false" owner="undefined"
private="false">
<role actionset="Privileged User" update="set">
<mapping subjectid="all authenticated portal users"
subjecttype="user_group" update="set"/>
</role>
</access-control>
</portlet-app>
</web-app>
</portal>
</request>
Step 2 :- Open command line, change to /opt/WebSphere/wp_profile/PortalServer/bin,
copy the war file to installableApps and DeployPortlet.xml xmlaccess file on to desktop, and
trigger following command
./xmlaccess.bat -in ~/Desktop/DeployPortlet.xml -out
DeployPortlet_out.xml -url http://localhost:10039/wps/config -user
wpsadmin -password wpsadmin
Step 3 :- Check the output file, DeployPortlet_out.xml in the
/opt/WebSphere/wp_profile/PortalServer/bin directory
Result :-
The portlet is now imported and can be verified from portal administration by adding it to a page.
Step 1 :- Create DeployPortlet.xml as given below to deploy the portlet ear
<?xml version="1.0" encoding="UTF-8"?>
<request
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="PortalConfig_8.0.0.xsd"
type="update"
create-oids="true">
<portal action="locate">
<web-app action="update" active="true"
uid="SPFStandardStockQuote.war.webmod">
<url>file:///$server_root$/installableApps/NameOfWarFile.war</url>
<portlet-app action="update" active="true"
uid="NameOfWarFile.war">
<access-control externalized="false" owner="undefined"
private="false">
<role actionset="Privileged User" update="set">
<mapping subjectid="all authenticated portal users"
subjecttype="user_group" update="set"/>
</role>
</access-control>
</portlet-app>
</web-app>
</portal>
</request>
Step 2 :- Open command line, change to /opt/WebSphere/wp_profile/PortalServer/bin,
copy the war file to installableApps and DeployPortlet.xml xmlaccess file on to desktop, and
trigger following command
./xmlaccess.bat -in ~/Desktop/DeployPortlet.xml -out
DeployPortlet_out.xml -url http://localhost:10039/wps/config -user
wpsadmin -password wpsadmin
Step 3 :- Check the output file, DeployPortlet_out.xml in the
/opt/WebSphere/wp_profile/PortalServer/bin directory
Result :-
The portlet is now imported and can be verified from portal administration by adding it to a page.
Hi Krishna, I am new to portal, would you be able to let me know what are the fields that should be edited in the above xml file that you have furnished to deploy through xml interface, awaiting your response
ReplyDelete