on 01-14-2005 12:58 PM
Hello together,
I have a rather simple question and thus hope for a simple answer
Within an ME JSP application I want to place a link to the ME homepage. So I placed
<i><a href="http://127.0.0.1:4444/me">...</a></i>
in the JSP. When I call this page it takes me to the login page instead of the homepage. But I don't want my users to logon again, especially not on a PDA.
So what is a proper link to the ME homepage that considers the current user logon?
Best regards,
Tim
While using MI2.5, the URL you need can be achieved through URLFormatter.getUniqueMIHomeURL().
For MobileEngine there is no such method, but try to redirect the user to:
http://127.0.0.1:4444/me/servlet/com.sap.ip.me.core.LoginServlet
Regards,
Todor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As you guessed right, I am using ME 2.1. The deeper link you proposed does not work. I have traced the login process. The form does a post with the following parameters:
SYNC_USER=ess_test
SYNC_PASSWORD=12345678
eventlogin=Anmelden
Creating a hidden form which does a post is not too nice, as well. Any further ideas?
Regards,
Tim
getUniqueURL
public static java.lang.String getUniqueURL(java.lang.String relativeURL)
Returns an unique absolute URL string that is created on base of a given relative URL string. For that purpose the relative URL string is enhanced by a prefix containing the protocol (always: http), the host and the port information from the Mobile Engine configuartion. Furthermore the current time in milliseconds is added in the query part of the URL string. In fact this makes the URL string unique.
Examples:
Given relative URL string
/test/xyz.html
Returns:
http://localhost:4444/test/xyz.html?1064413138617
Given relative URL string
xyz.html?param=value&
Returns:
http://127.0.0.1:4444/xyz.html?param=value&1064413138617&;
Given relative URL string
test/appl/xyz.html?p=v#ref
Returns:
http://localhost:3333/test/app/xyz.html?p=v&1064413138617#ref
If the empty string or null is given as input value then the empty string is returned. The given relative URL string is not validated for syntactical correctness.
*********
This is the javadoc comment for URLFormatter.getUniqueMIHomeURL(). Unfortunately there's no explanation when the method returns "localhost" and when "127.0.0.1". This is important, because "localhost" gives some troubles on PocketPC 2003.
I recommend, you implement your own .getUniqueMIHomeURL(). So you know how exactly works the implementation.
Regards,
Todor
Hello Todor,
thanks for the javadoc, but this does not exactly answer my question.
You stated in your first post, that using the getUniqueURL method would enable one to link to the MI homepage (http://127.0.0.1:4444/me) from within my mobile application WITHOUT getting the MI login screen again.
But since the method just appends the milliseconds into a simple HTTP parameter and adds the http... prefix, I get the logon screen as well.
Any ideas?
Best regards,
Tim
Hello Todor,
I now use the URL http://127.0.0.1:4444/me/run/mobile_engine/!?1234567891234
where the 13-digit number can be chosen freely. This directs me to the ME home page. Thank you for your helpful hints!
Best regards, Tim
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.