It is possible to reference an asset both inside and outside of the portlet's WAR file.
<mcsi:portlet-context xmlns:mcsi="http://www.ibm.com/mwp/mcs-integration">
<mcsi:jdbc-policies name="portlet-jdbc-project-name"/>
<mcsi:assets base-url="/wps-context-root/portlet-object-id/"/>
<mcsi:portlet-content>
<%
The XDIME aggregator will include the portlet's markup here:
%>
</mcsi:portlet-content>
</mcsi:portlet-context>
where/base-url-value/value-setting-from-policy-file
where<img pane="G" src="/weather-cloudy.mimg" alt="no cloud image"/>
<lpdm:genericImageAsset value="/images/Cloudy.gif" />
/wps/PA_1_0_2H9/images/Cloudy.gif
If the portlet needs to reference assets that are outside its WAR file or that require a prefix to be added to the relative URL, it should wrapper the XDIME elements that reference asset policies–for example, the <img> element) with the <mwp:mobilePortletContent> JSP tag. There are different ways to use this JSP tag:
These approaches are described in the following sections.
<mwp:mobilePortletContent enable="true" prefixURL="/ics/ics">
<unit>
<img pane="G" src="/weather-cloudy.mimg" alt="no cloud image"/>
</unit>
</mwp:mobilePortletContent>
/ics/ics identifies the Image Conversion Service context root and servlet name on the WebSphere_Portal application server.
<mcsi:portlet-context xmlns:mcsi="http://www.ibm.com/mwp/mcs-integration">
<mcsi:jdbc-policies name="<portlet-jdbc-project-name>"/>
<mcsi:assets base-url="/ics/ics/wps/PA_1_0_2H9/"/>
<mcsi:portlet-content>
<unit>
<img pane="G" src="/weather-cloudy.mimg" alt="no cloud image"/>
</unit>
</mcsi:portlet-content>
</mcsi:portlet-context>
In this case, Multi-Channel Server would
construct the following relative URL to access the image:/ics/ics/wps/PA_1_0_2H9/images/Cloudy.gif
<mwp:mobilePortletContent enable="true" fullURL="/weather/" />
<unit>
<img pane="G" src="/weather-cloudy.mimg" alt="no cloud image"/>
</unit>
</mwp:mobilePortletContent>
In this case, the <mwp:MobilePortletContent> JSP
tag generates the following XDIME markup: <mcsi:portlet-context xmlns:mcsi="http://www.ibm.com/mwp/mcs-integration">
<mcsi:jdbc-policies name="<portlet-jdbc-project-name>"/>
<mcsi:assets base-url="/weather/"/>
<mcsi:portlet-content>
<unit>
<img pane="G" src="/weather-cloudy.mimg" alt="no cloud image"/>
</unit>
</mcsi:portlet-content>
</mcsi:portlet-context>
For this example, Multi-Channel Server would
generate the following relative URL:/weather/images/Cloudy.gif