Skip to Content
Author's profile photo Former Member

Display Custom Message on Post Portal Login

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.

Assigned Tags

      27 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Uday Kumar Kanike
      Uday Kumar Kanike

      Hi Naga,

             Nice blog. As always, the blog depicts your expertise on Portal.

      Hope to see more in near future.

      Thanks & Regards

      Uday Kanike

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks for the comments Uday, and hope I would get more chances!

      -MS

      Author's profile photo Former Member
      Former Member

      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.


      Author's profile photo Former Member
      Former Member
      Blog 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>:<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>:<port>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fevery_user!2fgeneral!2fframeworkpage?sap-config-mode=true

      Thanks, MS

      Author's profile photo Arun Jaiswal
      Arun Jaiswal

      Hi Naga,

      Very Nice Blog for Disclaimer Message in SAP Portal. Keep it up boss for many more blogs 🙂

      Best Regards,

      Arun Jaiswal

      Author's profile photo Former Member
      Former Member

      Hi Naga,

      thanks for your nice and neat blog, but it's not working fine with me would you please send me the par file to mohamed373@gmail.com

      Author's profile photo Former Member
      Former Member

      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,

      Author's profile photo Former Member
      Former Member

      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,

      Author's profile photo Former Member
      Former Member
      Blog 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

      Author's profile photo Former Member
      Former Member

      HI Naga,

      The content of JSP tile is the same code metioned above in the screen shot.

      thanks, and waiting for PAR file.

      Regards,

      Mohammed

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Fine, hopefully will send it by EOD 🙂

      Author's profile photo Former Member
      Former Member

      Hello Naga,

      still waiting!

      Author's profile photo Former Member
      Former Member
      Blog 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!

      Author's profile photo Former Member
      Former Member

      Hello Naga

      would you please give me your email to send you my PAR file.

      Author's profile photo Uday Kumar Kanike
      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

      Author's profile photo Former Member
      Former Member
      Blog 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

      Author's profile photo Uday Kumar Kanike
      Uday Kumar Kanike

      Thanks Naga,

               Will soon update you.

      Author's profile photo Former Member
      Former Member

      Hi Naga,

      Nice Blog..Keep it up.

      Thanks,

      rama

      Author's profile photo Raoul Shiro
      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

      Author's profile photo Former Member
      Former Member
      Blog 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

      Author's profile photo Raoul Shiro
      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

      Author's profile photo Raoul Shiro
      Raoul Shiro

      Hello Nava,

      Have you been able to find the source codes ?

      Thank you very much

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Raoul, I would have to prepare one... and send it you soon!

      Author's profile photo Former Member
      Former Member

      Hi Naga,

      We have same requirement. we are on 7.31 portal. Can you also send me instructions

      my email is ysandhu at gmail dot com

      Author's profile photo P K
      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?

      Author's profile photo P K
      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?

      Author's profile photo Sharadha K
      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.