Part 2. Making Changes to the Portal Logon Page in NW Portal 7.4
- Obtain the following files from your portal (ask your basis person to provide)
- Open your NW Developer Studio
- Import the WAR File: “tc~sec~ume~logon~ui.war”
- Copy the “tc~sec~ume~logon~logic_api.jar” file to the WebContent\WEB-INF\lib folder of the WAR project in NWDS.
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. Click on the Libraries tab and then 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:
Select OK to close
- Note: At this point, I would assume all the errors are gone. However, there will be errors in your project. I am left with 206 errors:
I was concerned with the large number of errors so I decided to confirm with SAP and was assured this is normal behavior and once the project has been deployed all the errors will resolve. SAP response included below:
- At this point, we are ready to test a change to the logon page. I will test changing the main logon image first. When our users logon in the morning, I want them to get fired up. So, I’m going to replace the boring SAP image with the image of a fired up JJ Watt (the Beast).
- Copy a new logon page image: “a_jjwatt.jpg” to WebContent\layout
- After any changes have been made, we need to be sure that WAR project is updated in the EAR project so the latest changes are picked up. For this Right Click on WAR project and select Java EE Tools –>Update EAR Libraries.
- Configuring Deployment Descriptors
- Note: this only needs to be done once (not each time you make changes)
- We need to configure 2 deployment descriptors of the EAR application as below:
- In the EAR project, view the General tab of the file <project_name>/EARContent/META-INF/application-j2ee-engine.xml.
- 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>
For this example, I will use: jjwattLogon.com
- 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
- Choose Create new and enter the required data
Result from steps above:
After saving the changes, the following XML is generated:
- 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: jjwattLogon.com
- 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
- To deploy the ear file, Right click on the EAR file 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.
Select next, and then enter the Instance:
Select Next and Finish and you will be prompted to enter your server credentials:
After the publish, you should get a successful message:
- Configuring UME properties in NWA
- We need to let the portal know we want it to use our new logon project
- Navigate to the following URL to modify UME properties through NetWeaver Administrator
- Change the property Alias of the application for customizing login pages (ume.logon.application.ui_resources_alias) to custom application from “/logon_ui_resources” “/jjwattLogon.com” which we mentioned previously in the Context root of application.xml
- Change the property Path or URL to the branding image (ume.logon.branding_image) from “layout/branding-image.jpg” to “layout/a_jjwatt.jpg”
- v. That’s it. Launch your logon page and you should see your new image: