This is the fourth blog in the series of blogs, which I am writing about Netweaver 7.3 Portal.
You can read the other blogs here:
I am not sure whether you have noticed this or not, When you login to your Netweaver 7.3 Portal the Browser doesn’t ask you to save your password. When I noticed it first time, I thought that I must have turned off some browser setting, and I am sure many of you may be thinking on same lines.
I tried to explore a bit after encountering this forum post:
and this blog is about unrevealing the mystery and a possible solution.
First thing which I did was to do a View Source on the Logon Page to figure out what’s going on.
After a while I could see something like below
A bit of googling told me that here AUTOCOMPLETE=”off” is the culprit.
I thought it’s going to be straight forward, I will just locate the logonform and turn AUTOCOMPLETE on. But unfortunately things are never too easy.
I opened the logonPage.jsp and tried to locate the logon form. (Read more about importing the login Page project and modifying it in 2nd blog of the series, mentioned above).
It looks like
From my limited knowledge of Tag Libraries, I could recall that it’s calling a Tag.
Soon I was able to find the Tag Library, which can be found inside
The relevant piece which I was looking for is below:
Now as you can notice, The form tag is contained in the class com.sap.engine.applications.security.logon.tags.FormTag
With the help of Jar Class Finder I was able to locate the FormTag class in tc~sec~ume~logon~logic_api.jar. A quick JAD allowed me to peep into the source code. (Read more about installing and using JAR class finder and JAD Eclipse in 2nd blog of the series).
And here i found what I was looking for. Inside doLogonForm() method :
This completed the first part of the problem, as I was able to unravel the mystery.
It was clear that to solve this problem, I will have to change the AUTOCOMPLETE to on. I usually try to avoid Decompiling standard jars-> Making changes-> Recompiling them, this can be a maintenance headache.
As I demonstrated in my previous blog (Blog 3 of the series), In most of the cases this can be achieved by taking out the necessary classes and building your own jar.
So here is the solution approach:
I used my LogonHelper project, which I created in my previous blog (Blog3 of the series).You can follow the steps below and get the same result.
1. Decompile (You can use JAD) the FormTag Class which is located in tc~sec~ume~logon~logic_api.jar
2. Create a Java class (In my case it’s com.cts.logon.tag.ZFormTag) and copy and paste the code which you got after the decompilation of FormTag Class.
3. In doLogonForm() method change out.print(” AUTOCOMPLETE=\\”off\\” “); to
out.print(” AUTOCOMPLETE=\\”on\\” “);
For reference The code is below:
4. Using the jarclass finder I was able to locate the jar files which need to be added to projet build path. The jars are:
ume.jar, logging.jar, sap.com~tc~je~security_api~impl.jar, sap.com~tc~sec~ume~core~impl.jar, sapxmltoolkit, servlet.jar, tc~sec~ume~logon~ui_core.jar, tc~sec~ume~logon~logic_api
5. Even after adding the jars I was getting Build error for BeanFactory class. It was not difficult to find out that BeanFactory class is protected and hence the error.I was not left with any choice but to write my own BeanFactory, ofcourse by decompiling the com.sap.engine.applications.security.logon.tags.BeanFactory class located in the same jar file as the FormTag Class.
6. Create another java class (In my case it’s com.cts.logon.tag.BeanFactory), and copy and paste the code that was generated after decompiling com.sap.engine.applications.security.logon.tags.BeanFactory class.
For reference the code is attached below:
7. The build error should be gone now and you should export the LogonHelper.jar
8. Place the LogonHelper.jar in tc~sec~ume~logon~ui\\WebContent\\WEB-INF\\lib.
9. Update the taglib.tld so that the implementation class for form tag points to your own tag implementation. (In my case it’s com.cts.logon.tag.ZFormTag).
10. Build the ear archive and deploy to the J2EE engine.
If you open the logon page now, enter the credentials and hit Logon, The browser should prompt you for saving the password. Ofcourse this is true only when the Save Password feature is enabled.
In Internet Explorer you can enable this by going to Tools->Internet Options->Content->AutoComplete. Check the Check box Prompt me to save Passwords.