cancel
Showing results for 
Search instead for 
Did you mean: 

Link to ME Homepage

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hello Todor,

can you post an example of the string that URLFormatter.getUniqueMIHomeURL() returns? I do not have an idea how to maintain the logon session when linking to ME homepage just by using a GET request.

Thanks!

Tim

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

I am sorry man, I have mixed .getUniqueURL() with .getUniqueMIHomeURL().

I have never got this problem, I am always redirected to the MI Home (non-logon) page. Are you sure your session has not been expired? Try to prolong your session timeout, I have done it.

Regards,

Todor

Former Member
0 Kudos

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

Answers (0)