ShowTable of Contents
Introduction
Virtual portals enable you to deploy additional portals quickly on an existing infrastructure.With virtual portals, you can use a single installation of Mobile Portal Accelerator to deploy multiple portals with different URLs, anonymous pages, user groups, and look and feel. Advantages of using virtual portals include reusing existing hardware, and simplified administration of multiple portals.This article will show the procedure in creating a MPA virtual portal.
Prerequisites
To verify the creation of a MPA virtual portal ,this article requires the following development environment:
Mobile Portal Accelerator 7.0 set up on WebSphere Portal 7.0
To verify the MPA virtual portal created, mobile simulators can be used.In this article,however we use the Mozilla firefox user-agents to verify the MPA virtual portal created.
Steps for creating a Mobile Portal Accelerator Virtual Portal
a) Login to the Portal Server using the credentials and go to the Portal Administration module.
b) Under the Portal Administration module,select the Manage Virtual Portal .Click on the Manage virtual portal link as shown in managevp.PNG image below.Once you click ,you will see the Virtual Portal Manager Portlet as shown in the virtualmanagerportlet.PNG image.
c) Click the portlet menu and select from the list of options the Configure option as shown below
The configure option should have in the "Xml script to create virtual portal content tree" textfield the following entry : WebSphere:assetname=MWPVirtualPortal.zip:MWPInitVirtualPortal.xml
d) Open the portlet menu and select from the list of options the Edit Shared option.Ensure that the textfield for the "Xml script to create virtual portal content tree" label contains the same value as mentioned in the configure option which is in step2. In other words,the entry should be WebSphere:assetname=MWPVirtualPortal.zip:MWPInitVirtualPortal.xml
e) Click on the New Virtual Portal button and you would see a screen as shown below
f) Once the creation is successful you should see a screen below with a success message
Accessing the MPA virtual portal
Access the mpa virtual portal you just created now using the default user agent (this could be the default user agent of the Firefox Mozilla Browser or even can be viewed using IE) .The view is shown below in the image vpusingdefaultuseragent.PNG.
Now access the same mpa virtual portal you just created now using a Blackberry 8800 user agent .The view is shown in the vpusingBB8800useragent.PNG image below.
Creating different virtual portals with different look and feels
Each virtual portal can be given a different look and feel by modifying the aggregator policies or policy sets that it uses.
Virtual portals are associated with the appropriate policy set in the mwp.properties file. Multiple virtual portals can use the same policy set.
If a unique look and feel is not needed, the virtual portals can use the default policy set
The following section below shows you how this can be achieved.
Creating the new aggregator policies
The default policy set can be found at the location : wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/policies/aggregator/ where wp_profile_root is the directory where
WebSphere® Portal is installed.
Change your working directory to wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/policies/aggregator/ where wp_profile_root is the directory where WebSphere® Portal is installed.
Create a new directory for the policy set you want to use eg. vp2.
Customizing the new aggregator policies
Copy the /wp directory and all of the policy files to the new directory which was created in step1 ie vp2 .
Customize the different aggregator policies related to background color,font size,style and alignment
Importing the new aggregator policies into the MCS Database and making changes to mwp.properties
We need to make sure that the new policies are imported into the MCS DB.
Change your working directory to wp_profile_root/ConfigEngine and run the command : ./ConfigEngine.sh mwp-import-policies or ConfigEngine.bat mwp-import-policies
Open the mwp.properties in a text editor.This file is usually found at the location wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/shared/app/config location.
For the property mwp.virtual.portals, add the virtual portal URL context name to the value
Add the following property to the file and specify the policy set to use. In the following example, the first vp2 is the virtual portal name and the second vp2 is the directory name you created earlier.
Eg : mwp.vp.policyset.18_8000CB1A00U5D0IKQD9PHS1002=/vp2
note: 18_8000CB1A00U5D0IKQD9PHS1002 is the object id of the Virtual portal. To get the object id use the ConfigEngine[bat/sh] list-all-virtual-portals task
Save the changes and close the file
Accessing the virtual portal which contains the new aggregator policies
Restart the Portal Server and access the mpa virtual portal you created earlier : vp2 .