Skip to Content

Display Custom Message on Post Portal Login

Summary:

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

Prerequisite:

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

Objective:

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

Configuration:

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

1.PNG

Select an application of type PAR, click on Next

2.PNG

Give relevant Project Name, click on Finish

3.PNG

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

4.PNG

Select Simple > Select File > click on Next

5.PNG

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

6.PNG

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

7.3.PNG

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.

8.PNG

 

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.

9.PNG

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.

10.PNG

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:

11.PNG

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:

12.PNG

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

Execution:

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,

13.PNG

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.

14.PNG

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!

15.PNG

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.

To report this post you need to login first.

27 Comments

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

      1. Santosh G

        Hi Naga,

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

        /irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fevery_user!2fgeneral!2fframeworkpage?sap-config-mode=true

        Thanks,

        Santosh.


        (0) 
        1. Naga Devisetty Post author

          Good point!

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

          http://<hostname&gt;:<port>/irj/servlet/prt/portal/prtmode/preview/prtroot/pcd!3aportal_content!2fevery_user!2fgeneral!2fframeworkpage?sap-config-mode=true

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

          http://<hostname&gt;:<port>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fevery_user!2fgeneral!2fframeworkpage?sap-config-mode=true

          Thanks, MS

          (0) 
  1. Mohammed Shahahmad

    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.

    regards,

    (0) 
  2. Mohammed Shahahmad

    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

    Thanks,

    (0) 
    1. Naga Devisetty Post author

      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!

      Thanks,

      MS

      (0) 
    2. Naga Devisetty Post author

      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!

      (0) 
      1. Uday Kumar Kanike

        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 ?

        thanks

        Uday

        (0) 
        1. Naga Devisetty Post author

          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.

          ~Tnx,MS

          (0) 
  3. Raoul Shiro

    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 :

    sapien44@gmail.com

    Thank you in advance

    Best Regards

    Raoul

    (0) 
    1. Naga Devisetty Post author

      Thanks Raoul,

      Well there has been few changes on the solution, and same has been implemented for couple of other clients successfully (both 7.0 & 7.3). But right-now i’m having access any of those souce-code. Will try to get it some-how and mail to your personal id!

      Thanks,

      MS

      (0) 
      1. Raoul Shiro

        Thank you very much for your response Naga,

        We are running EP 7.31, and it indeed, it would be great if you could send me the source code

        Best Regards

        Raoul

        (0) 
            1. P K

              Hi, It would be very useful for many people to share the source for Portal version 7.3 / 7.4 . Can you please share it with us?

              (0) 
          1. P K

            Hi, It would be very useful for many people to share the source for Portal version 7.3 / 7.4 . Can you please share it with us?

            (0) 
  4. Sharadha K

    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.

    (0) 

Leave a Reply