A preload notice is simply a set of JSP fragments defined in multiple markups.
All JSPs that go into preload notices are served by the WebSphere® Portal web module and are defined in the following directory structure:
wp_profile_root/installedApps/node_name/MPATheme.ear/MPATheme.war/preload/pln_fragment_name/xdime/default.jsp
where pln_fragment_name is the preload notice fragment name.
When you develop the JSP fragment, give it the name default.jsp and place it into this directory with a unique fragment name. The WebSphere Portal administrator will use the fragment name, in Manage Mobile Pages, to select a preload notice to configure for a particular page, URL, or portlet.
For example, the preload notice named GiveMeMoney can be found in this location: wp_profile_root/installedApps/node_name/MPATheme.ear/MPATheme.war/preload/GiveMeMoney/xdime/default.jsp
The JSP is an open canvas for whatever you want to fill, and default.jsp contains content for whatever type of preload notice you want to create. The following types of preload notice are defined:
Because preload notice fragment JSPs are included in the MPATheme EAR, you must update and redeploy the EAR if you add or modify a JSP fragment. See the topic Deploying updates to the MPATheme EAR in this information center.
<%
String mwpTargetURL = (String)request.getAttribute("mwpTargetURL");
%>
Request Parameter | Description |
---|---|
mwpTargetURL | The URL of the target content that is the original URL where the user intended to visit. |
mwpBackURL | The URL of the page where the user came from before viewing the preload notice. |
mwpTargetTitle | An optional title that the administrator would like to appear on the preload notice. The preload notice must incorporate this title in order for it to be displayed. |
mwpUser | The user ID of whoever is currently logged in and is viewing this preload notice. If the user is anonymous then this value is null. |
mwpContentOID | The ObjectID of the content node containing the preload notice. |
mwpPreloadNoticeID | The preload notice ID. |
mwpActionURL | An optional URL to configure an action button. For an advertisement preload notice, it configures the Yes button. Custom preload notices may use this for any custom button. |
mwpTimeOut | Optionally defined timeout for the preload notices. Custom preload notices must add this capability to the custom JSP fragment and provide a URL to redirect to. |
mwpDisplayDoNotPrompt | Optionally defined Boolean to determine whether to allow a do not prompt check box. Custom preload notices must add this capability to the custom JSP fragment. |
<canvas layoutName="/wp_generic_preload_notice.mlyt" type="portlet">
<pane name="T">
<p>This is a preload notice!</p>
</pane>
</canvas>
Within this <canvas> tag, you can add content for what is displayed to the user when the preload notice is shown. If you are including a title, you may want to hardcode a title or use the one defined by the administrator using the mwpTargetTitle request parameter. The example uses the /wp_generic_preload_notice.mlyt layout policy, which is available by default.
If custom policies are required, you must import new custom policies into the aggregator policies project.