Insert dynamic table html/jsp code

Use Rational Application Developer to code the dynamic table in the Personalized Offers portlet JSP. Export the project as a Web archive (WAR) file. Open the WebSphere Portal Administration page for Portlet Management and update the Web module containing the Personalized Offers portlet.

Before you begin this procedure, ensure that you have created a content spot.
  1. Open Rational Application Developer and open Pers_OffersPortalView.jsp in edit mode.
  2. Insert the following code at the end of the JSP page:
    Here are all your personalized offers:
    try {
    pers_offers.Pzn_offers[] items = offersSpot.getRuleContent();
    pers_offers.Pzn_offers item = items[0]; // throws an exception if empty. %>
    <TABLE WIDTH="100%">
    for (int i = 0, c = 0; ; ) {
    if (c == 0) { %>
    <TR bgcolor="e7e7e7"><%
    else { %>
    } %>
    <TD><%= item.getTitle() %>: <%= item.getDetails() %>
    c = c == 0 ? 1 : 0;
    try {
    item = items[i];
    catch (java.lang.ArrayIndexOutOfBoundsException _e0) {
    } %>
    catch (java.lang.ArrayIndexOutOfBoundsException _e0) {
    %><FONT>There are no current articles to display. </FONT><%
    } %>
  3. Save and close the file. Verify no errors other than exception handling errors.
  4. Export the project as a war file. Close Rational Application Developer.
  5. Log in to WebSphere Portal as wpsadmin. Open Administration > Portlet Management > Web Modules.
  6. Click the Update button to update the Web module.
    How the WebSphere Portal Administration portlet Web Modules displays the Update button
  7. Complete the installation process using the newly created war file.
You can now modify the resource collection properties for Pzn_Offers_User.