10.1 Maintaining Customized JSP Files for Identity Server

Access Manager contains a default user portal and a set of default login pages from Access Manager 4.2 onwards. The new login pages have a different look and feel compared to the default login pages of Access Manager 4.1 or prior. If you have customized the legacy user portal, you can maintain the customized JSP pages in the following two ways:

10.1.1 Using Customized JSP Pages from Access Manager 4.1 or Prior

  1. Before upgrade, create a copy of all JSP files inside the jsp directory and place the copy somewhere else.

    Linux: /opt/novell/nids/lib/webapp/jsp

    Windows: \Program Files\Novell\Tomcat\webapps\nidp\jsp

    WARNING:The upgrade overwrites all existing JSP files.

  2. Upgrade Identity Server.

  3. Create an empty folder legacy in Identity Server

    Linux: /opt/novell/nids/lib/webapp/WEB-INF/legacy

    Windows: \Program Files\Novell\Tomcat\webapps\nidp\WEB-INF\legacy

    NOTE:If you do not create the legacy folder, Access Manager uses the logic of the default new login pages.

  4. Copy your all backed up JSP files into the jsp directory.

    Linux: /opt/novell/nids/lib/webapp/jsp

    Windows: \Program Files\Novell\Tomcat\webapps\nidp\jsp

  5. Refresh the browser to see the changes.

10.1.2 Using Customized JSP Pages from Access Manager 4.1 or Prior and Enabling the New Access Manager Portal

  1. Before upgrade, create a copy of all JSP files inside the jsp directory and place the copy somewhere else.

    Linux: /opt/novell/nids/lib/webapp/jsp

    Windows: \Program Files\Novell\Tomcat\webapps\nidp\jsp

    WARNING:The upgrade overwrites all existing JSP files.

  2. Upgrade Identity Server.

  3. Create an empty folder legacy in Identity Server

    Linux: /opt/novell/nids/lib/webapp/WEB-INF/legacy

    Windows: \Program Files\Novell\Tomcat\webapps\nidp\WEB-INF\legacy

    NOTE:If you do not create the legacy folder, Access Manager uses the logic of the default new login pages.

  4. Copy your all backed up JSP files into the jsp directory.

    Linux: /opt/novell/nids/lib/webapp/jsp

    Windows: \Program Files\Novell\Tomcat\webapps\nidp\jsp

  5. Find the customized nidp.jsp and content.jsp files and make the following changes in both files:

    1. In the top Java section of the JSP file, find the ContentHandler object that looks similar to the following:

      ContentHandler handler = new ContentHandler(request,response);
    2. In the code, add the following Java line under ContentHandler:

      boolean bGotoAlternateLandingPageUrl = handler.gotoAlternateLandingPageUrl();
    3. Find the first instance of <script></script> in the JSP file that is not <script src></script>, then insert the following line in to the JavaScript section between the <script></script> tags:

      <% if (bGotoAlternateLandingPageUrl) { %>
              document.location = "<%=handler.getAlternateLandingPageUrl()%>";
      <%  } %>

      This redirects control to the default portal page that contains appmarks.

    4. Save the file.

    5. Repeat the steps for the second JSP file.

  6. Refresh the browser to see the changes.