11
Customizing SAP Portal Logon Page using Logon.Par. Applies to: Par File Configuration in NWDS, SAP NetWeaver 2004s, SAP NetWeaver 7.0. Summary This article demonstrates the step by step technique of Customizing the Logon.Par file in NWDS to get the required output on the Logon Page of SAP Portal . Author: Nitesh Kumar Company: Tata Technologies Created on: Sept 10, 2011 Author Bio Nitesh Kumar has been involved with Tata Technologies as a SAP NetWeaver Consultant. The author has more than three years of experience on SAP Netweaver technologies and has knowledge in diverse aspects of Web Dynpro Java development, SAP Enterprise Portal, Java/J2EE, Adobe Document Services and Adobe Interactive Forms. SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2008 SAP AG 1

Customizing Portal Logon Page

Embed Size (px)

Citation preview

Page 1: Customizing Portal Logon Page

Customizing SAP Portal Logon

Page using Logon.Par.

Applies to: Par File Configuration in NWDS, SAP NetWeaver 2004s, SAP NetWeaver 7.0. Summary This article demonstrates the step by step technique of Customizing the Logon.Par file in NWDS to get the required output on the Logon Page of SAP Portal .

Author: Nitesh Kumar Company: Tata Technologies Created on: Sept 10, 2011 Author Bio

Nitesh Kumar has been involved with Tata Technologies as a SAP NetWeaver Consultant. The author has more than three years of experience on SAP Netweaver technologies and has knowledge in diverse aspects of Web Dynpro Java development, SAP Enterprise Portal, Java/J2EE, Adobe Document Services and Adobe Interactive Forms.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 1

Page 2: Customizing Portal Logon Page

Customizing SAP Portal Logon Page using Logon.Par

Table of Contents Getting started

Scenario

Changing the Branding Image and Branding Text

Changing Labels

Creating Document Links Deploying the par

Changing authschemes.xml

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 2

Page 3: Customizing Portal Logon Page

Customizing SAP Portal Logon Page using Logon.Par

Getting started Download com.sap.portal.runtime.logon.par.bak file from System Administration > Support > Portal Runtime > Browse Deployment >

Now Rename com.sap.portal.runtime.logon.par.bak to com.sap.portal.runtime.logon.par . Import this Par file to NWDS.

Select File>Import .

- Choose the option PAR file. Select Next and a popup window appears.

- Select File>Import .

- Choose the option PAR file. Select Next and a popup window appears.

- In the window you have 3 text fields:

* The location of the par file,

* Project name (same as new par file name, preferably) and

* location for project to be saved

Check, that you have the following 2 JAR files under the subfolder /lib : 1. com.sap.portal.runtime.logon_api.jar 2. umelogonbase.jar Scenario

After the Par import the hierarchy looks as follows containing the JSP’s and the images. Under PORTAL-INF we will get various JSP’s for the Logon Page .

Logon page : umLogonPage.jsp

Problem page : umLogonProblemPage.jsp

Help (PW reset) page : umHelpPage.jsp

Reset Password : umResetPasswordPage.jsp

Change Password Page: changePasswordPage.jsp

Certificate Logon : umLogonCertPage.jsp

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 3

Page 4: Customizing Portal Logon Page

Customizing SAP Portal Logon Page using Logon.Par Changing the Branding Image and Branding Text

Change the names of default images to branding-image_sap and branding-text_sap and paste your image with the default names. The images are located in layout folder.

Changing Labels The text seen on the logon page is not in the JSP page, but in properties files which are called by tags like the Welcome text : <%=logonLocale.get("xtit_WELCOME")%> In order to change "Welcome" to "Welcome to COMPANYNAME" you have to : - Unzip the file umelogonbase.jar which you can find under dist\PORTAL-INF\lib - Find the file "logonLabels_" which contains your language; e.g. for german logonLabels_de.properties, for russian logonLabels_ru.properties or for English logonLabels_en.properties The default is in the file logonLabels.properties . - Find the key which is used in the tag (here it is xtit_WELCOME) and change the text after the equal sign. - Save the changed file and create a updated JAR file using a zip program. The file needs to be named umelogonbase.jar, not umelogonbase.zip or umelogonbase.jar.zip. - Put the JAR file back to dist\PORTAL-INF\lib. SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 4

Customizing SAP Portal Logon Page using Logon.Par

Page 5: Customizing Portal Logon Page

Note: the default umelogonbase.jar in the lib folder should be replaced with this new updated umelogonbase.jar file Creating Document Links You can add a document link to the logon page, which points to a KM document. The document can

contain the help file for Portal which can be accessed by anonymous users for getting logon help.

1. Setup a folder Logon, e.g. under Public Documents and put in there the document you want to

point to.

2. Setup the folder with Read access for the Anonymous Users group.

3. Create a KM Document iview and choose Anonymous as access, but don¡¦t change the path to the

document yet.

4. Preview the document and note down the URL of this page (In most browsers Right-click outside

the image and select Properties to get the URL).

5. In the iview add now the KM path an d preview it again to make sure that the path is correct.

6. In the logon page, create a link. The href value is the URL you noted down but starting with /irj

and without the portal server name and port (otherwise you have to change it after every transport).

For adding the link on the Logon Page we need to make the following changes to the

umLogonPage.jsp. the following code is added to the last of the jsp file

<tr>

<td colspan="2" height="20">&nbsp; </td>

</tr>

<tr>

<td align="left" bgcolor="E9E9E9" colspan=2>

<table border="0" cellpadding="0" cellspacing="0" >

<tr>

<td>

<span class="urLblStdBar"> <a class=urLnk

href="javascript:openNewWin1();">Portal User Guide</a></span>

</td>

</tr>

</table>

</td>

</tr>

Simple script for a popup needs to be added to open it in new window.

function openNewWin1()

{

window.open("http://server:port/irj/go/km/docs/etc/Nitesh/HelpFile.pdf");

}

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 5

Page 6: Customizing Portal Logon Page

Customizing SAP Portal Logon Page using Logon.Par

Deploying the par Now the par file is ready to be deployed , right click on the project and click on Quick Par Upload. Enter the required details in the window which appears.

Note: The name of the par file should be unique (for eg : com.mycompanyname.logon.par) I have now the new par file, but to have the portal reference on this PAR file, we need to customize and upload the customized authschemes.xml file through the Config-Tool of SAP WebAS. Changing authschemes.xml

When you edit the file, you should download the file to a local directory, edit it, and when uploading the edited file, create a new node in the configuration tree for it. In this way you do not loose the original version of the file. 1. Start the Config Tool by executing \j2ee\configtool\configtool.bat. 2. Navigate to cluster_data>server>persistent>com.sap.security.core.ume.service. 3. Switch to edit mode by clicking on the pencil which is at the upper right area. 4. In the tree, select authschemes.xml and choose Download. Save the file to your local directory. 5. Edit the local file: To select the new PAR file as the Logon page change the occurrence of all substrings com.sap.portal.runtime.logon to your project/PAR file name. All com.sap.portal.runtime.logon should be substituted with something like com.company.portal.runtime.logon (or whatever you project name is). Don’t remove the part behind it. (These are the profiles in the portalapp.xml and have the names default, certlogon, basicauthentication, header, and anonymous).

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 6

Page 7: Customizing Portal Logon Page

Customizing SAP Portal Logon Page using Logon.Par

6. Create a new node in the configuration tree in the Config-Tool for the edited file as follows: a.Select the node com.sap.security.core.ume.service. b. Choose the symbol for Creating a node below the selected node. c. Select the type File-entry. d. Choose Upload and select the custom file from your local directory. e. Enter a name for the entry, for example, authschemes_mycompany.xml. By default, the name of the uploaded file is used.

f. Choose Create. g. Choose “Close window”. h. The new node appears in the configuration tree. i. Go to Global server configuration>services> com.sap.security.core.ume.service and edit the property login.authschemes.definition.file. The value needs to be changed from authschemes.xml to authschemes_mycompany.xml

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 7

Page 8: Customizing Portal Logon Page

Customizing SAP Portal Logon Page using Logon.Par

j. Restart the Portal.

After the restart the Portal Logon Page will look like

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 8

Page 9: Customizing Portal Logon Page

Customizing SAP Portal Logon Page using Logon.Par

Related Content

Modifying the Logon Page Login Screen Customization

Send your feedback at [email protected]

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 9

Page 10: Customizing Portal Logon Page

Customizing SAP Portal Logon Page using Logon.Par

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document. SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

© 2008 SAP AG 10

Page 11: Customizing Portal Logon Page