+

Search Tips   |   Advanced Search

Customize error messages for web content viewers

If an error occurs during rendering, the web content viewer shows an error screen. We can customize the default error screen, and we can create the own custom JSP file used to display error messages. The default error screen provides a standard error message, which is shown on every type of error, and a more detailed error message. The detailed error message provides information about the cause of the error and is displayed when you click the View details link.

  1. Create a customized error JSP file.

    1. Make a backup of...

        wp_profile_root/installedApps/node_name/PA_WCMLRingPortJSR286.ear/ilwwcm-localrende.war/jsp/html/error.jsp

      Almost everything in the original JSP file can be changed according to the requirements. To show the cause of the error, retain this part of the original file in the error JSP file:

        <%-- use errorbean from request --%> 
        
        <jsp:useBean id="errorbean" 
                 scope="request" 
                 type="com.ibm.portal.portletui.messages.StatusMessageBean" /> 
        
        <% String msg = errorbean.getMessage(); %> 
        

      The variable msg contains the message text of the error. In the original error.jsp file, this message is only shown in a separate window if a user selects the View details link.

  2. Configure the web content viewer to use the customized error JSP file.

    1. Log in to the portal as an administrator and go to...

        Administration > Portlet Management > Portlets > Web Content Viewer (JSR 286) portlet > Configure Portlet

    2. Edit the value of the ERROR_JSP parameter, and set the path to the customized error JSP file as the parameter value.

      We can store JSP files in one of two locations:

      • Within....

          wp_profile_root/installedApps/node_name/PA_WCMLRingPortJSR286.ear/ilwwcm-localrende.war

        When storing JSP files in this directory, enter the path to the custom error JSP relative to the directory.

      • Within any other web application running on the portal. When referencing JSP files in another web application, use the following path:

          contextPath;jspPath

        For example:

          /wps/customapplication;/jsp/error.jsp


Parent: Customize web content delivery