Skip to Content

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:

Getting started with Netweaver 7.3 portal Part 1-Installation

Getting started with Netweaver 7.3 portal Part 2 – NWDS and Logon Page

Getting started with Netweaver 7.3 portal Part 3 – Logon Language and Login Module

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:

http://forums.sdn.sap.com/thread.jspa?threadID=2127718&tstart=90

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

tc~sec~ume~logon~ui->WebContent->WEB-INF->taglib.tld

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.

To report this post you need to login first.

17 Comments

You must be Logged on to comment or reply to a post.

  1. Eli Eren
    apparently its only me here.

    thank you for your kindness in writing this blog!

    I cant find the jars, is there a normal method in finding them? tried looking for the ones you’ve mentioned in the portal but no avail.

    thanks,
    Eli.

    (0) 
    1. Kumar Prashant Post author
      Hi Eli,
      I Eli it’s my pleasure to do something meaningful, I am glad that it helped you.

      Regarding jar file, I use a pretty brute method, Whenever I install a Server I do a search for *.jar on the root directory of the server, arrange the jar files in Ascending order of size and copy them to a folder for all future use. In case you still face any issues with the jars, drop me a mail in on the address mentioned in my business card and I wills send the files to you.

      Regards
      Prashant

      (0) 
      1. Eli Eren
        hi!
        i was able to find all the files except ume.jar using this method of yours – turns out windows can search for filenames containing “~”

        since it can be problematic for me in inserting files that i receive from you to my company’s network (nothing personal mate 🙂 )
        could you please point me to where you found this file? thanks alot!

        (0) 
        1. Kumar Prashant Post author
          Hi Elen,

          I understand your constraints :).
          You can pretty much ignore ume.jar as you won’t need it for this example. It was part of Build path of my LogonHelper Project as there is some stuff related with my previous blog which needs this.
          You should be able to build and test this example without ume.jar

          PS: You won’t find ume.jar in NW-7.3, I have copied and used it for some features which were there in NW 7.0. For more details refer part-3 of my blog.

          Thanks
          Prashant

          (0) 
          1. Eli Eren
            hi,
            I replaced the form tag.
            But it says it cannot parse unrecognized file.

            should i export the Classses i built with special settings ? thanks alot!

            (0) 
    1. Kumar Prashant Post author
      Hi Rao,

      It might work for save password, however if you look at doLogonForm() mmethod, it’s not only spitting the HTML for Form, but doing lot of other stuff as well. I wouldn’t want to skip those, and hence this approach.
      Hope it clarifies.

      Thanks
      Prashant

      (0) 
  2. Prabh Simran Kaur

    HI

    We are trying to replace standard application call(tc~sec~ume~wd~enduser/LogonHelpApp) at Logon Problem link in EP 7.3. After analysis we found that <sap:link> tag in logonPage.jsp is defined in taglib.tld(com.sap.engine.applications.security.logon.tags.LinkTag) for logonhelp link.And the reference to LinkTag is contained in tc~sec~ume~logon~logic_api.jar. So we decompiled LinkTag class and modified the code as below:

    else if (“logonhelp”.equalsIgnoreCase(this.type)) {
           if (SAPMLogonServlet.getLogonHelp()) {
            writeInfoText(“LOGON_IN_PROBLEM”);
    /*     writeLink(“/webdynpro/dispatcher/sap.com/tc~sec~ume~wd~enduser/LogonHelpApp?newWindowOpened=true”, “GET_SUPPORT”, “_blank”); */
          writeLink(“/webdynpro/dispatcher/irda.org/irda_bap~surveyor~wd~disclsrs/DisclosureApp?newWindowOpened=true”, “GET_SUPPORT”, “_blank”);
     
         }

    and reconstructed the jar file(added testUpdated.jar and removed tc~sec~ume~logon~logic_api.jar) and kept in WEB-INF/lib folder.

    But Logon help link is still redirected to the standard application(LogonHelpApp). Please guide us what went wrong in above changes or we need to do some other configurations for calling custom webdynpro application.

    (0) 
  3. Jan-Erik Hov

    Hi Prashant!

    My current problem is to retrieve the jar’s mention in step 4 since the Jar class finder no longer is available for download on the IMB site. Could you provide me with the jars or a valid downloadlink for the jar class finder.

    BR

    Jan-Erik

    (0) 
      1. Jan-Erik Hov

        Hi Prashant,

        Thank you for the quick reply and brilliant blogs. I have found all the jars except the ume.jar. Do you have the location for the library in 7.3?

        BR

        Jan-Erik

        (0) 
        1. Kumar Prashant Post author

          Hi Jan-Erik,

          You can pretty much ignore ume.jar as you won’t need it for this example. It was part of Build path of my LogonHelper Project as there is some stuff related with my previous blog which needs this.

          You should be able to build and test this example without ume.jar


          PS: You won’t find ume.jar in NW-7.3, I have copied and used it for some features which were there in NW 7.0. For more details refer part-3 of my blog.


          Thanks

          Prashant

          (0) 
          1. Jan-Erik Hov

            Hi Prashant,

            The reason that I asked for ume.jar is that I still have som missing dempendcies to the import statements of ZFormTag.java aften adding the other 7 jars to the project.

            com.sap.security.api.UMFactory

            com.sap.security.api.util.IUMParameters

            com.sap.security.core.server.sdi.util.StringUtils

            I was able to resolve the two first by adding com.sap.security.api.jar but the las  util.StrinUtil was not resolved. ( No luck fiding the correct jar containg the class so far)

            in the code of the class there are mostly errors related to JspTagException and methond from StringUtils, so I assume that getting the last jar reference in place will resolve these problems

            BR

            Jan-Erik

            (0) 
  4. Per-Rune Eide

    Hi and thank you for the great detailed blog,

    It might be a stupid question but isn’t there a way of enable autocomplete without any modification of the standard logon page? It seems to be a lot of work for such a small parameter change.

    Thank you in advance!

    Regards

    (0) 
    1. Kumar Prashant Post author

      Hi Per-Rune Eide. Thanks for the kind words.

      You don’t really need to go through so much of work. One line of JQuery can do the same for you:

      $(‘#logonForm’).attr(‘AUTOCOMPLETE’, ‘on’);

      However, The blog is more about how to modify the standard tag library and if needed how to create your own custom tags.

      Regards

      Prashant

      (0) 
      1. Ricky M

        Hi Prashant,

        I am in love with these series, it has taught me tremendously. I have just one request.

        For people like me who are on the Basis/Admin side of things but deeply interested in this sort of development. Can you please prepare a 4th blog explaining deeply just one project like loginpage.jsp !! . As you know SAP has changed everything upside down and I am really finding it hard to grasp it now.

        1. <sap:label type=”username” styleClass=”urLblStdNew” flagReqClass=”urLblReq”/>

        i understand its a lable with username and I could find the style class in css also, when i changed this value in properties it did not show up, i tried changing directly it did not change.. So how do we change it…

        what does this do ?

        <% String webpath = (String) request.getAttribute(“logon.application.real.path”); %>

        if i have my own custom html and css how can i incorporate these… (just hello world with a little css would be sufficient… Where to keep css file, how to call it in JSP)

        I know I am asking is like a tutorial, but if you have time please do it.

        Thanks again for excellenttttt series !!

        (0) 

Leave a Reply