cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the User IP address

Former Member
0 Kudos

Hello folks,

Somebody knows how can I get the user IP address (logged in a EP Portal) by the Web Dynpro application ?

Thanks in Advance,

Evandro.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try following code..

HttpServletRequest req =

((com

.sap

.tc

.webdynpro

.services

.sal

.adapter

.core

.IWebContextAdapter) WDWebContextAdapter

.getWebContextAdapter())

.getHttpServletRequest();

String ClientIPAddress = req.getRemoteAddr();

You will have to add servlet.jar in build path for this to work...