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.
But there were open questions like
- How to put our custom HTML page design in properties file.
- Server location to put new properties file?
- 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.
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.
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.
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.
Ø Change the extension of jar from .jar to .zip. Unzip the content and get the default properties file at
Ø 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
Ø 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.
Ø Restart your server
That’s it …You are done. Now your custom look for http error pages will reflect.
404 HTTP Error Page
404 HTTP Error Page
503 HTTP Error Page