Skip to Content

The purpose of this Blog is to provide the information about the Configuration of Custom Error Message of the following error pages.

1. ‘Dispatcher Connected Server not Running’ error page.
2. ‘Application Stopped’ error page.
3. ‘HTML error Messages’ such as 404,403,500 error pages.
4.  KM Error Pages 

 

h3. 1.   Customizing ‘Dispatcher Connected Server not Running’ error message.

Error Condition:

The dispatcher is started and able to receive client requests but there is no server attached to it to process the requests.

 

Customizing Steps:

The following customizing steps are to be done for every instance of the Portal.

 

a.     Create a folder called “errormessage” in the below directory.

             /usr/sap/<SID>/<instance>/j2ee/cluster/dispatcher/

 

b.    Creat your own custom HTML error page ‘serverdown.html’.

        Keep serverdown.html page under this location.

Error Page Location:/usr/sap/<SID>/<instance>/j2ee/cluster/dispatcher/errormessage/serverdown.html

 

c. Set the following property in Visual Administrator.

+ServiceUnavailableResponse += ./errormessage/serverdown.html

    Navigate to Cluster-> Server -> Services -> HTTP Provider

    Use the S+erviceUnavailableResponse +property of the HTTP Provider Service on the dispatcher to specify the path to your error page.

       d. Restart the j2ee instance.

       

      Now serverdown.html will be shown when the dispatcher is started but there is no server attached to it .

       

       

      h3. 2.   Customizing ‘Application Stopped’ error message.

      Error Condition:

      The Portal application that you have requested is stopped at the moment.

       

      Customizing Steps:

      The following customizing steps are to be done for every instance of the Portal.

       

      a.     Create a folder called “errormessage” in the below directory.

                   /usr/sap/<SID>/<instance>/j2ee/cluster/dispatcher/

       

      b.    Creat your own custom HTML error page ‘appdown.html’.

              Keep appdown.html page under this location.

      Error Page Location:/usr/sap/<SID>/<instance>/j2ee/cluster/dispatcher/errormessage/appdown.html

       

      c. Set the following property in Visual Administrator.

      +ApplicationStoppedFile += ./errormessage/serverdown.html

      Navigate to Cluster-> Server -> Services -> Web Container 

      Use the ServiceUnavailableResponse property of the HTTP Provider Service on the dispatcher to specify the path to your error page.

         d. Restart the j2ee instance.

         

        Now appdown.html will be shown when the Portal application that you have requested is stopped.

          

          

          

        3.   Customizing HTML error Messages such as 404,403,500 error pages.

         

        Error Condition:

        The Portal page that you have requested is giving a standard HTML error meaage such as 404,403,500 etc.

        Note: Using this Customization we cannot change 400 error message.

         

        Customizing Steps:

         

        The following customizing steps are to be done for every instance of the Portal.

         

        a.     Create a folder called “customerrors” in the below directory.

                     /usr/sap/<SystemID>/<InstanceID>/j2ee/cluster/<ServerNode>/apps/sap.com/irj/servlet_jsp/irj/root/

         

        b.    Creat your own custom HTML error page ‘403.html’,’403.html’,’403.html’,’404.html’,’408.html and ”500.html’.

        Keep the custom HTML pages under this location.

        Error Page Location: /usr/sap/<SystemID>/<InstanceID>/j2ee/cluster/<ServerNode>/apps/sap.com/irj/servlet_jsp/irj/root/customerrors

         

        c. Navigate to: /usr/sap/<SystemID>/<InstanceID>/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf</p><p style=”margin: 3pt 0cm” class=”tableheading”> </p><p style=”margin: 3pt 0cm” class=”tableheading”>Edit web.xml file found in the above location to add the below XML snippet</p><p style=”margin: 3pt 0cm” class=”tableheading”> </p><p style=”margin: 3pt 0cm” class=”tableheading”>+ <error-page><br />             <error-code>403</error-code><br />             <location>/customerrors/403.html</location><br /> </error-page><br /> <error-page><br />             <error-code>404</error-code><br />             <location>/customerrors/404.html</location><br /> </error-page><br /> <error-page><br />             <error-code>408</error-code><br />             <location>/customerrors/408.html</location><br /> </error-page><br /> <error-page><br />             <error-code>500</error-code><br />             <location>/customerrors/500.html</location><br /> </error-page><br /> </p><p style=”margin: 3pt 0cm” class=”tableheading”>  </p><p style=”margin: 3pt 0cm” class=”tableheading”> d. Restart the j2ee instance.<br /> </p><p style=”margin: 3pt 0cm” class=”tableheading”>  </p><p style=”margin: 3pt 0cm” class=”tableheading”>Now in case of any html error such as 403, 404, 408 or 500 your custom error html pages will be displayed by the portal.</p><p style=”margin: 3pt 0cm” class=”tableheading”> </p><p style=”margin: 3pt 0cm” class=”tableheading”>Note:</p><ul><li>In case if you want to change the error messages for a specific application, then copy the “customerrors”+ folder inside /servlet_jsp of the application component folder as the deployment descriptor file, web.xml is specific to an application.

           

          4.   Customizing KM error messages.

           

          Error Condition:

          You can modify the standard KM error pages that are displayed when an error occurs.

           

          Customizing Steps:

           

           a.      Create an HTML page 403.html, 404.html 408.html and nonavfound.html with the required error message.

            

          b. create a folder under any directory in the server.

          eg: /etc/error_pages

           

          c.     Login the portal as Adminitrator.

                   Choose System Administration ->System Configuration -> Knowledge Management -> Content Management ->Web Page Composer ->Error Pages ->Error Pages .

           

          d.      Select the required error page and choose Edit.

           

          e.      In the RID of Error Page parameter, enter the path to the HTML file that you want to be displayed if an error occurs.

          Example: +/etc/error_pages/nonavfound.html +

           

           d.      Save the changes

            

          Now in case of any KM error such as 403, 404, 408 or 500 your custom error html pages will be displayed by the portal.

            

          Additional Reference:

          Please refer to the below documentations in case you find any difficulties following the steps specified in the blog.

           

           

          SAP Notes –

            1. Note 795699 – Customizing default error messages for HTTP.

            2. Note 1113811 – Web Dynpro error page, known error situations, error codes

            3. Note 962319 – Detailed error messages with stack trace in Web Dynpro.

            

          SAP HELP –

           SDN Blogs –

          [Custom Error Messages Using SAP Web Dispatcher | Custom Error Messages Using SAP Web Dispatcher]

           

           

          To report this post you need to login first.

          6 Comments

          You must be Logged on to comment or reply to a post.

          1. chayapathy cs
            Hi,

            Thanks a lot, this is quite useful.
            However i have one query, when you mentioned that
            Set the following property in Visual Administrator.
            ServiceUnavailableResponse = ./errormessage/serverdown.html
            May I know where I should do this?

            (0) 
          2. Arul Narayanaswamy
            I made changes for KM Error page and it did not work. I checked with SAP support and was told that this will work only for WPC pages and not for KM content. I am looking for a way to customize 403 page returned when accessing KM content. Please let me know how to accomplish this if it is possible. Thanks.
            (0) 

          Leave a Reply