Skip to Content
Personal Insights
Author's profile photo Kai Unewisse

Beautiful Portals : Custom Error pages

Lets face it, nobody wants to see error pages. But they will show up from time to time in the SAP Enterprise Portal.

The error page could come from a typo of oa user or a servernode which is turned off.

The default SAP Portal Error page displays the content, but it is far from beautiful.

So a good portal should have a custom page.

I saw another very useful blog from Madhvika Joshi: Customizing HTTP Default Error Pages for SAP NetWeaver Portal 7.3 

This blog was the basis of some tests of my own.

I wanted the following things to accomplish.

  1. Custom CSS should be part of the HTML
  2. An image should be displayed.

The first thing regarding CSS as part of the HTML was easy. Adding it to the head-body was working immediately. The length of the property value was initially something i was worried about, but even 4255 characters worked…

head-body =  <style><!– CSS Code here –></style>\r\n

The other thing was using an image. A colleague of mine showed me a way of embedding images within an HTML document, so there is no issue with adding the correct path and put the image to the right place. You can BASE-64 encoding an image (e.g. Base64 Image Encoder )

So e.g the image of a blue circle can be added this way:

<img src=”data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAA ….SUVORK5CYII=”/>

What else:

Varibles are only interpreted in certain properties::

{CODE} and/or {REASON} :  property response-code-server-version

{DETAILS} : property details

To use HTML in the Standard mode and not using IE Quirks mode, you can do the following:

html-begin = <!DOCTYPE HTML PUBLIC \”-//W3C//DTD HTML 4.0 Transitional//EN\”>\r\n<!–[if lt IE 7]><html class=”no-js lt-ie9 lt-ie8 lt-ie7″> <![endif]–><!–[if IE 7]><html class=”no-js lt-ie9 lt-ie8″> <![endif]–><!–[if IE 8]><html class=”no-js lt-ie9″> <![endif]–><html>\r\n

head-begin = <head><meta http-equiv=”X-UA-Compatible” content=”IE=Edge” />\r\n

You can test the error page by using a wrong portal path: e.g. irj/portalX or by calling a KM document that does not exist.

We have also a portal-related knowledge space; the link is also embedded in the HTML Documents.


Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.