Skip to Content

Display Custom Message on Post Portal Login

Display Custom Message on Post Portal Login


The purpose of this article is to show the step-by-step procedure for Displaying Custom Message to the Users who successfully login to SAP NetWeaver Portal.

Applies to: SAP NetWeaver Portal 700 SP22

Authors: Naga Devisetty

Created On: 01 SEP 2012


Basic knowledge of HTML coading

NWDS installed and little exposure on developing PAR applications

Super Administrator role and knowledge of Portal Desktops and Master Rule Collection


There are different approaches on the ‘requirement of displaying a customized messages’ on various scenarios to users who are successfully authenticated into Portal. General approaches like:

i) displaying a pop-up window using JavaScript loading directly from MastHead PAR iView

ii) displaying pop-up windows using WDJ and PAR application sitting as a saperate elements in the default framework page

But few customers are looking for a scenario as ‘the solution that should fit in between the login page & welcome page’, so there is a requirement for an additional layer between these TWO UI stages. The current article describes to fulfill the middle layer for displaying the Customized Messages post to Portal Logon which could typically Terms & Conditions of Usage, Usage Agreements, Disclaimers & General Information etc,.


1. Create a custom PAR application with required JSP page

Purpose: We need to create a custom PAR application for the custom message to be displayed after the portal logon.

Open the NWDS > goto EP perspective > create a new Project


Select an application of type PAR, click on Next


Give relevant Project Name, click on Finish


Out requirement is to create the web-content primarily with text, so select New in the project to create JSP file


Select Simple > Select File > click on Next


Give relevant name for the JSP file, customMessage.jsp and click on Finish


Open the customMessage.jsp file and embed the code given below as shown in the screenshot


Note: The html form action target URL path is

<form name=“groovyform” action=“/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fevery_user!2fgeneral!2fframeworkpage?sap-config-mode=true”>

Now deploy or explort the generated PAR file into your Portal server and Run it.

Below is the OUTPUT of the PAR applications deployed into the server.



2. Create a custom Portal Desktop

Purpose: The custom message for users is displayed through the custom Portal Desktop along with the new master rule defined for set of users or gorup.

2.1 Create a PAR iView on the custom PAR application in Content Administrator

Create a PAR iView ‘PLMH (Portal Logon Message Header)’ of PortalLogonMessage application in Content Administrator.


2.2 Create a custom Portal Framework Page, add the PAR iView

Now create a new portal framework page ‘PLMHFP (Portal Logon Message Header Framework Page)’ and assign the PLMH iView to this framework page as delta-link in Content Administrator.


2.3 Create a custom Portal Desktop with a framework page & default theme

Goto System Admin > Portal Display > Desktops & Display Rules > create a new portal desktop ‘PLMHD (Portal Logon Message Header Desktop)’ and assign the newly created framework page and the default theme as shown in the below screenshot:


2.4 Create a new Display Rule in Master Rule Collection

Goto System Admin > Portal Display > Desktops & Display Rules > Portal Administrator > Super Administrators > open Master Rule Collection and make the below assignments as shown in the screenshot:


RED Circle: We need to ensure that ALL logging users/group are assigned to a defaultDesktop or projectSpecificDesktop, reason being… this is the desktop that has all the framework elements.

BLACK Circle: After the users login to portal their are first redirect to this PLMHD desktop, which was created in step-2.3


3. Login & Test Navigation

Lets test the execution part of this article by login using the user-id specified in the display rule collections. You will login with the regular ‘/irj/portal’ url,


On the event of successfull login, the portal framework checks for the Desktop to be loaded as per the order specified in the rules-collections.

And as specified in step-2.4 the login user has the PLMHD desktop tobe loaded first by default, and below is the screenshot of the results.


Note: Developers can implement their own logic for Agree & DisAgree action events in the JSP page, while on Agree to take them to Portal and on DisAgree call the Logout from the portal.

Now on click of Continue, you would be taken to the defaultDesktop or projectDesktop loaded as displayed in the screenshot and also the outcome of this exercise.

Users of portal are now allowed to navigate to all Roles and content of it as usaul as before!


Note: Notice the change in the URL of the Portal, this has been redirected to the desktop needed!

Also view the screencasting of the complete exercise!

Related Content:

1. SCN THRED: Display Messaage in portal after user authenticated

The main prupose of writing this article!

2. SCN DOC: Displaying Message in both Pre and Post Portal Login

This article talks about another nice approach, except that you would need to login to portal using application URL or implement an extention to this application by redirecting the lenghty URL using a web-dispatcher or an IIS server.

You must be Logged on to comment or reply to a post.
      • Hi Naga,

        Nice blog, this is really helpful.Could you please let me know how to get this URL




        • Good point!

          When you do a Preview on your defaultFrameworkPage (or your projectFrameworkPage) it opens in a new window with the below url:


          As it opens in preview mode, you will need to remove that and use the below ones for normal mode:


          Thanks, MS

  • Hi all,

    what the portalapp.xml should be because when I try to deploy the par file did not show wny iview in PAR.

    by other words I cannot display the par file when i want to creat ivew based on this par file.


  • Hello,

    1-I created the project PostLogonMessage.

    2- then, I created the JSP file customMessage.jsp

    3- I copied the same code as shown in the image.

    4- then I deploy the par file

    I cannot display the par file when I want to create an Iview based on Portal component

    I did not do any thing on the XML file

    please need your help to do this step by step


    • Hi Mohanned,

      What is the content inside you JSP? And portalapp.xml has nothing to do here..!

      Anyways, i would send you the PAR i’ve configured soon to your id specified!



    • I’m unable to find the PAR file, and did u debug why the below is happeing?

      “I cannot display the par file when I want to create an Iview based on Portal component”.

      When you’ve deployed it should be available as application under PAR Components.

      Let me know!

      • Hi Naga,

                 I got a new requirement which is similar to this post. My client wants to login to portal only once and after loggin in a page need to be displayed with links to different portal like hyperlinks. From these link, when enduser clicks on anyone of them, they should be able to migrate to concerned individual portals without any additional logons. I think this can be achieved through SSO and configuring individual portal data sources in UME.  I am not 100% sure if this is possible. Can you give me any hint on this ?



        • From these link, when enduser clicks on anyone of them, they should be able to migrate to concerned individual portals without any additional logons.

          If you can achieve SSO to the said Individual Portals from EP, this requirement can doable…! So plz, come back with your analysis on SSO possibility to the target Portals.


  • Hello,

    Thank you very much for the blog, having a custom message displayed on the portal is a key feature.

    I am a SAP basis Administrator, not really into HTML coding or NWDS,

    would it be possible to send me the PAR file/ or the HTML coding part displayed in the screenshot ?

    Here is my email adress :

    Thank you in advance

    Best Regards


  • Thanks a lot for this blog. It saved me a lot of time. Initially I wanted to change the logon page to include a additional security layer of validating token values entered by the user. This blog offered me a simple solution instead of digging the login modules of SAP.