on 12-14-2016 10:31 AM
Hi I have the similar requirement to capture the IP Address of clients while running a particular application from portal. Can anyone please help me in capturing this requirement.
Hi Santosh,
If you are trying to capture the IP Address in a java based application, below code will be helpful. Highlighted String will have the user's system IP address.
import java.net.InetAddress;
import java.net.UnknownHostException;
try {
InetAddress ipAddr = InetAddress.getLocalHost();
String IP = ipAddr.getHostAddress();
} catch (UnknownHostException ex)
{ ex.printStackTrace(); }
Regards,
Kamal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.