on 05-10-2011 8:48 PM
Hi all,
I have a requirement where i need to get the following:
-Client's IP address from where an user is connected to the portal.
-Client's IP address from where someone change a user password (also if the DB keeps user who made the changes will be usefull)
-Client´s IP address from where an user blocks his account
I have checked the NWA (WebAdminApp), and there is a session monitoring where i can see the active sessions on portals and the IP where the user is connected to. I just want to know the API used for that and some information that can guide me. I cant find an API to help me with this, if any of you know something or have any information, it will be usefull.
Regards,
MC
Hi Mariana,
You might want to check the related javadocs:
Code would look something like:
IWDRequest request = WDProtocolAdapter.getProtocolAdapter() .getRequestObject() ;
String clientHostAddress = request.getClientHostAddress();
Hope it helps,
D.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mariana,
Use what daniel said, it works fine.
or you can use
import java.net.*;
InetAddress thisIp =InetAddress.getLocalHost();
String IPAddress = thisIp.getHostAddress();
If u want to know the name of the user also then use this code.
try {
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IUser user = wdUser.getSAPUser();
} catch (WDUMException e) {
e.printStackTrace();
}
Regards,
Pradeep Kumar
Edited by: pradeep_546 on May 11, 2011 11:48 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.