cancel
Showing results for 
Search instead for 
Did you mean: 

IP problem in UME

Former Member
0 Kudos

hi,all.

I used the UME in webdynpro.

Is there any API to get the current user's IP address?

THX.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all, is there anybody can help us ? Its very urgent

Former Member
0 Kudos

ty lu,

This is not possible with UME API.

You may cast WDWebContextAdapter.getRequest (do not remember exact name) to HttpServletRequest and try to obtain remote address from this object.

However, taking on account all issues with firewalls / proxies the result even in this case will be inaccurate.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi Valery

How can I get WDWebContextAdapter object in my local webdynpro application ?

Can you give me some hints

Former Member
0 Kudos

Rrrrr....

Armin is right, but...

In NW04s it is


import com.sap.tc.webdynpro.services.sal.adapter.api.WDProtocolAdapter;
...
WDProtocolAdapter.getProtocolAdapter().getRequestObject()

Sorry, I forget how to get http request object in pre-NW04s, try to search forum.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Thanks Valery.

But I cannot find which jar file contains this classes ?

Can you give me some hints ?

Former Member
0 Kudos

Hi,

<i>

How can I get WDWebContextAdapter object in my local webdynpro application ?</i>

Its available in the build path already.No need to add any jars.

WDWebContextAdapter.getWebContextAdapter().???

Use CTRL+space.. for help..

Regards

Bharathwaj

Former Member
0 Kudos

Thank you, Bharathwaj.

But how can I cast one string to another object ?

There is method

getRequestParameterMap

getRequestParameter

getRequestParameterValues

But which import parameter should I use ?

Former Member
0 Kudos

Hi,

I don't quite understand your query.

Do you mean to get the IP address of the system the user is using to view your application which has been deployed in a remote portal? If that is the case, then I am not too sure if you can do this. What if the user is inside a LAN and is using a proxy to connect to your portal? In that case the IP address that you'll get (if you manage to get it) will be of the proxy server. That is not what you want.

In case you want to retrieve the IP of the system on which the application is deployed, it's 127.0.0.1 .

Regards,

Satyajit.