You are on page 1of 1

Customizing Error Messages of Portal applications

Author: Santhosh Raj


Submitted: 23 October 2008
In Portal implementations, many of us might have come across requirements pertai
ning to Usability and Aesthetics. For me, one among such requirements was to dis
play custom error messages which are user friendly instead of the standard error
messages with SAP J2EE specific exceptions.
During the compliance check in the final preparation stage of the implementation
s, the below are the few points which normally clients highlighted.
Compliance Issue: Observed parameter:
It was observed that the Portal application has responded with error message, in
dicating an undefined state that may expose sensitive information. The above st
atement refers to the Exceptions displayed in Portal.
Corrective Action:
User friendly message to be displayed for error codes 404, 403, 500 or any other
Java specific errors.
There is a standard procedure for capturing error codes and displaying custom er
ror messages using KM. Details on the same can be found in the below link.
http://help.sap.com/saphelp_nw70/helpdata/EN/47/1d5a4390524403e10000000a1553f6/f
rameset.htm
But this doesn't help in capturing all the exceptions. The following approach ca
n be used for customizing the error messages of all the Portal applications depl
oyed in the server. The below steps refer to the configurations for URI starting
from irj.
Procedure for customizing Error messages for Applications starting from /irj:
1. Create custom error pages (HTML/JSP) as per the company branding standar
ds for error codes 403, 404, 500, etc or for any Java exceptions and place it in
side a folder, say Error_Pages.
2. Log in to Portal Server through FTP/Telnet access as an administrator. I
n the physical folders browse and navigate into the apps folder. The path for th
e same is given below. ftp://<FQDN>/usr/sap/<SystemID>/<InstanceID>/j2ee/cluste
r/<ServerNode>/apps/sap.com/irj/servlet_jsp/irj/root/
3. Copy the Error_Pages folder in the above mentioned path.
4. Navigate to WEB-INF folder and edit the <error-page> tag occurrences of
web.xml file as given below:
5. Save the file. The changes will reflect after restarting the server.
Result: Example for Error Code 404
Before
After
Note:
â ¢ In case if you want to change the error messages for a specific application, the
n copy the Error_Pages folder inside /servlet_jsp of the application component f
older as the deployment descriptor file, web.xml is specific to an application.
â ¢ The procedure is required to be repeated in case of multiple clusters in the Por
tal Server.

You might also like