Skip to Content

It really took our significant time to achieve subjected goal. We started with the traditional way of modifying web.xml of portal root application but to no success. It was time for research which took us to following sap help link.

Changing the Look and Feel of the Default Error Pages

But there were open questions like

  1. How to put our custom HTML page design in properties file.
  2. Server location to put new properties file?
  3. Do we need to specify full path to properties file in NWA configuration of just property file name?

With this blog I am putting step by step solution to put your own custom html page design in properties file.

Solution:

As mentioned in sap link we will create our own custom properties file to show our custom look and feel for HTTP error pages. Default errorPageFragments.properties file is available within sap.com~tc~je~httpserver~impl.jar. 

Before that

Here is a quick analysis of comparison of the source code of Default 404-Not Found http error page and default properties file as in which line is coming from which key of default properties file.

/wp-content/uploads/2014/04/2_435951.png

With this information, now let’s start putting our custom look and feel in new properties file.

Ø Get sap.com~tc~je~httpserver~impl.jar  file from following server location.

    \usr\sap\<sid>\<instanceid>\j2ee\cluster\bin\services\http\lib\private

Ø Change the extension of jar from .jar to .zip. Unzip the content and  get the default properties file at 

   com\sap\engine\services\httpserver\interfaces\

Ø Edit the default properties file .Put your own HTML page design in relevant keys of properties file with the analysis shown in above screen shot. Save the file t with a different name say customErrorPageFragments.properties. With this blog I have attached my custom properties file.

Ø On Server directory\usr\sap\trans\ create a folder say  “Custom” and place your new customErrorPageFragments.properties file there .The complete path now for new properties file is

\usr\sap\trans\Custom\customErrorPageFragments.properties

Ø Replace the existing properties file with a custom one

1.     Open the SAP NetWeaver Administrator.

2.    Choose Configuration Management Infrastructure Java System Properties. Specify the template in the Templates section.

3.    Choose the Services tab in the Details section.

4.    Choose the HTTP Provider service.

5.    Click on Show Advanced Properties at top.

6.    Select the ErrorPageTemplateLocation property in the Extended Details section. Choose Modify.

7.    Specify the location of the file that contains the new user interface. Choose Set and then Save.

/wp-content/uploads/2014/04/3_435952.png

Ø Restart your server

     That’s it …You are done. Now your custom look for http error pages will reflect.

                 Before Modification

404 HTTP Error Page

/wp-content/uploads/2014/04/4_435928.png

After Modification

404 HTTP Error Page

/wp-content/uploads/2014/04/5_435977.png

503 HTTP Error Page

/wp-content/uploads/2014/04/6_435979.png

Regards,

Madhvika

Please do correct me if I have mentioned anything wrong.

To report this post you need to login first.

2 Comments

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

  1. Preeti Pradhan

    Hi,

    Nice blog. I did implement on our portal . however the change was visible when the parameter was changed but now again it has been replaced back to original SAP one

    WE did not do any change in portal after this change. Do you have any idea?

    (0) 
  2. Saravanan Sethumurugan

    Hi,

    Nice Blog!!!

    Is there a way to redirect a 400 Error Code (Session Timeout/Bad Request)?

    Can we deploy a servlet and pass the custom Servlet to be used by SAP JAVA Error handling?

    Regards,
    Sethu

    (0) 

Leave a Reply