Introduction: This article proposes an alternative way of migrating from lower versions of MPA to MPA8.0. The normal process is outlined in the article 1 mentioned under reference section. The process outlined in the article 1 requires a portal migration. If you have the portal installation ...

In MPA 8.0 use of tag to reference the images/assets outside the portlet is deprecated. Instead of using this tag follow the below steps to reference image/assets. There are two approaches to reference the assets.

A) Reference image through a static project .Step 1:

Create a new definition of the project in mcs-config.xml file. The file is present at two locations \installedApps\hostname\mcs.ear\mcs.war\WEB-INF\mcs-config.xml and\PortalServer\wp.mobile\wp.mobile.mcs\mcs-config.xml . You should add the details like below in both copies of mcs-config.xml file .

Please note down the attributes identity (project), directory (xml-policies), base-url(assets) and prefix-url(In child element of assets) in the above example.

Step 2:
Put all the policy files like .mimg, scripts etc in directory "xml-policies" used in project definition .In the following example all polices are placed in below directory.\installedApps\hostname\mcs.ear\mcs.war\projects\examples\policies
Place different policy files in different sub folders. See the snap below.

Step 3:
Put all the assets in the directory which is accessible via base-url provided in tag. Eg: image "magnifying-glass.png” should become available if you hit this url http://host:port/mcs/projects/examples/assets/images/magnifying-glass.png.
For this purpose you can create a directory inside mcs.ear/mcs.war/projects folder and put assets under that directory.
See in this example the assets are placed in below directory.

Step 4:
Similarly you can create script policy. While creating image/script policy just use simple file name in place of url (if you have followed the exact url pattern described above)Step 5:
Restart the server.

Step 6:

Follow the following syntax to add image/script policy in custom jsp's.

B) Referencing the assets through dynamic projects Step 1:
Create a String Buffer having details of project. (or portelt ) from where customer can access policies.
In the following example you can create

Step 2:
Details of variable used In xml-configuration file are given below

a) name = Name of Web Module(portlet) installed . (In this case name inside InstalledApps gives the module name eg: PA_offlineSample.ear)