Quantcast
Channel: SCN : Blog List - SAP Enterprise Portal
Viewing all articles
Browse latest Browse all 334

Customizing HTTP Default Error Pages for SAP NetWeaver Portal 7.3

$
0
0

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.

 

2.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.

 

3.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

 

4.png

After Modification

 

404 HTTP Error Page

 

5.png

 

503 HTTP Error Page

6.png

Regards,

Madhvika

 

Please do correct me if I have mentioned anything wrong.


Viewing all articles
Browse latest Browse all 334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>