Customizing Logon Page on Portal 7.3
Please find below details steps for customizing logon page on Portal 7.3.
1. Locate the WAR file.
First step is to get the WAR file delievered by SAP for logon page to customize it.
Copy the war file tc~sec~ume~logon~ui.war to your local machine from
<Installation drive>:\usr\sap\<SID>\J00\j2ee\cluster\apps\sap.com\com.sap.security.core.logon
\servlet_jsp\logon_ui_resources\tc~sec~ume~logon~ui.war
2. Import the WAR file
Next we have to import the WAR file into NWDS by going to: File --> Import -->Web --> War File
Select the WAR file from the local system.
As EAR format can be deployed on JEE server, corresponding EAR project has to be created.
For this, check the “Add project to an EAR “checkbox as above and specify suitable name in “EAR project name “based on the
WAR project name.
Click Finish to create both WAR and EAR projects.
Expand the WAR project.
At this point you will notice errors in the project. To remove these errors follow the next step.
3. Adding the required JAR file to remove the Errors.
a. Next you need to locate the Jar file “tc~sec~ume~logon~logic_api.jar” on which the WAR file is dependent from the following location:
<drive>\usr\sap\<SID>\J00\j2ee\cluster\apps\sap.com\com.sap.security.core.logon\servlet_jsp\logon_app\root\WEB-INF\lib
Copy the “tc~sec~ume~logon~logic_api.jar” file to the WebContent\WEB-INF\lib folder of the WAR project in NWDS.
b. This Jar file has also to be added in the build path of WAR file.
Right Click the WAR project and select Build Path --> Configure Build Path.
c. Click on Libraries tab.Click on “Add External Jars” and select the JAR file “tc~sec~ume~logon~logic_api.jar” from local system and “Add” to get the following screen:
Once done you will notice that all errors have gone !!
4. Make Changes to Layout
a. Now its time to start making the desired changes to the layout. In our example we are changing the branding image
on the Logon screen. We have copied the image “hearts.jpg” to the folder WebContent\layout
SAP delivered image branding-image-portals.jpg has dimension 290X360 px . If you select a bigger image it will get truncated based on the mentioned dimensions. To change the dimensions you need to edit the element urBrandImage in css file
urBrandImage{overflow:hidden;width:290px;height:360px}
b. After the changes have been made, we need to be sure that WAR project is updated in the EAR project and latest changes are
picked up. For this Right Click on WAR project and select Java EE Tools -->Update EAR Libraries.
5. Configuring deployment descriptors
Next we need to configure 2 deployment descriptors of the EAR application as below:
a. application-j2ee-engine.xml
b. application.xml
a. Configuring application-j2ee-engine.xml
In the EAR, view the General tab of the file <project_name>/EARContent/META-INF/application-j2ee-engine.xml.
i. Enter a provider name for your application.This is usually domain name of the client.
The provider name defines your namespace where your applications reside on the AS Java.
If you enter “example.com”, the application deploys to the following path:<ASJava_Installation>/j2ee/cluster/apps/example.com/<project_name>
ii . Next we need to add reference to the standard application com.sap.security.core.logon
Choose References and choose + with the quick info text Add element
iii. Choose Create new and enter the required data.
Reference Data for the Logon Application
Field Name | Data |
Reference target | com.sap.security.core.logon |
Reference type | hard |
Reference target type | application |
Provider name | sap.com |
This will generate the XML in background which can be displayed in the SOURCE tab :
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<application-j2ee-engine
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">
<reference
reference-type="hard">
<reference-target
provider-name="sap.com"
target-type="application">com.sap.security.core.logon</reference-target>
</reference>
<provider-name>newLogon.com</provider-name>
</application-j2ee-engine>
b.. Configuring application.xml
In the EAR, edit the file <project_name>/EARContent/META-INF/application.xml, and define the URL alias and for your custom logon UI.
Double click on application.xml and go to Modules tab . Select the WAR file and enter the “Context Root” field for example : new_logon
We have to provide this alias name later in NWA so please make a note of it.
6. Creating the deployable EAR file
Next we need to create a deployable EAR file . For this right Click on EAR project and select Export -->SAP EAR file
7. Deploying the EAR file
Right click on the EAR project and select Run As --> Run on server
Enter the credentials of the server and file will get deployed on the server with a success message.
You might get an Error screen in NWDS after deployment as below however you can ignore it.
8. Configuring UME properties in NWA
Navigate to the following URL to modify UME properties through Netweaver Administrator
a. Change the property Alias of the aplication for customizing login pages (ume.logon.application.ui_resources_alias)
to custom application “ new_logon” which we mentioned previously in the Context root of application.xml
b. Change the property Path or URL to the branding image (ume.logon.branding_image) to “layout/hearts.jpg”
Hurray!!! We have successfully customized the Logon Screen …
9. Next aim is to have a custom text or Notice on the logon page.
Please add the following code after line 44 in the logon.jsp.
<!-- ********************************************* -->
<!-- disclaimer notice -->
<tr>
<td class="urLblStdNew">
<span ><b>Notice for All Users</b>
<br><br>Paste your content here.
</span>
</td>
</tr>
<!-- ********************************************* -->
Save the new values and restart the portal server.
This finishes (or rather begins) our journey with the customization of Logon page …. !!!
评论
Arindam Chattopadhyay 2012-5-11 上午10:55
Excellent article!! Great resource for EP 7.3 starters.
Thanks
Sandeep Tudumu 2012-5-11 下午1:58
Neat! Good job.
Kiran Bhonsley 2012-5-11 下午3:01
Have you tried changing the Copyright message in logonLabels_<loclae>.properties files?Does not appear the changes take effect. Any suggestions?
NS Hussain 2012-11-14 上午8:53 (回复 Kiran Bhonsley)
Hi kiran,
I am facing the same problem
tried changing the Copyright message in logonLabels_<loclae>.properties files.. But the changes are not appearing... Any suggestions?
Regards,
NS
Hari Krishna Dandhibhotla 2012-6-11 上午11:27
Hi,
Could you please look @ my question posted @ http://scn.sap.com/thread/3187490
and help me out with a solution.
Thanks in Advance
DHK
Ritesh Mehta 2012-6-18 下午7:33
did same steps, still the jsp errors are not going.
Varun Biswas 2012-8-28 上午7:17
Hi,
Good blog. Just wanted to ask, how does one know about the dependent jar files.
Thanks
NS Hussain 2012-11-14 上午8:54
Hi,
I am facing a problem
tried changing the Copyright message in logonLabels_<loclae>.properties files.. But the changes are not appearing... Any suggestions?
Regards,
NS
Kai Unewisse 2012-12-7 上午10:25
Hi,
there is with SP8 a mobile section (see more in the Blog from Yotam Kadishay:
http://scn.sap.com/community/netweaver-portal/blog/2012/12/06/customizing-the-portal-log-on-pages
One issue: there is a second JAR required. Anyone knows which one?
Fredy Cazares 2013-1-18 下午6:27 (回复 Kai Unewisse)
I have the same issue, any updates?
Boris Todorov 2013-3-20 下午8:21 (回复 Kai Unewisse)
If you're doing this exercise in 7.31 you will face the issue of having errors even after adding the tc~sec~ume~logon~logic_api.jar file to the lib folder and the Java Build Path. This is due to having a mobile folder and some of the variables are already defined... NWDS cannot figure this out and thinks that the variables are not initialized although they are.
Just ignore these errors and continue with the EAR and the rest of the step. When you deploy the changes you've done will be there.
See this thread for more details on this issue: http://scn.sap.com/thread/3187490
Regards,
Boris
Elena Escuder 2013-1-11 下午3:25
Hi,
How I've to configurate Forget Password and Other Problems I could see before in logon Page?
Thanks
Elena
krishna Reddy 2013-1-12 下午4:45 (回复 Elena Escuder)
HI Elna,
You have enable the password reset configuration via SAP Portal System administration --> UME configurations.
http://help.sap.com/saphelp_nw70/helpdata/en/45/7e6313d8780dece10000000a11466f/content.htm
Thanks
Krish
Armin Rabet 2013-2-8 下午4:35
Perfect "How To". Thansk purav.
Armin
Robert Altenstraßer 2013-2-27 上午10:44
Thank you so much !!!!
only one: pls remark in your doc. if you you use httpS > modify certLogonPage.jsp
Robert