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
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
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,
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 a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
50 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 |