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.
The dispatcher is started and able to receive client requests but there is no server attached to it to process the requests.
The following customizing steps are to be done for every instance of the Portal.
a. Create a folder called “errormessage” in the below directory.
b. Creat your own custom HTML error page 'serverdown.html'.
c. Set the following property in Visual Administrator.
+ServiceUnavailableResponse += ./errormessage/serverdown.html
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.
The Portal application that you have requested is stopped at the moment.
The following customizing steps are to be done for every instance of the Portal.
a. Create a folder called “errormessage” in the below directory.
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
d. Restart the j2ee instance.
Now appdown.html will be shown when the Portal application that you have requested is stopped.
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.
The following customizing steps are to be done for every instance of the Portal.
a. Create a folder called “customerrors” in the below directory.
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/customerrorsc. 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.
You can modify the standard KM error pages that are displayed when an error occurs.
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.
Please refer to the below documentations in case you find any difficulties following the steps specified in the blog.
Note 795699 - Customizing default error messages for HTTP.
Note 1113811 - Web Dynpro error page, known error situations, error codes
Note 962319 - Detailed error messages with stack trace in Web Dynpro.
[Custom Error Pages | http://help.sap.com/saphelp_nw70/helpdata/EN/47/1d5a4390524403e10000000a1553f6/frameset.htm]
[Modifying KM Error Pages | http://help.sap.com/saphelp_nw70/helpdata/EN/47/1d5a4390524403e10000000a1553f6/frameset.htm]
[Custom Error Messages Using SAP Web Dispatcher | Custom Error Messages Using SAP Web Dispatcher]