on 04-27-2011 4:03 PM
Hi, I need to know if there is any way to get the pc name in a Web Dynpro application or ip address of the computer running the application WD, ie I need the name or ip of the client, not server, thanks, regards
Hi,
use this code;
InetAddress thisIp =InetAddress.getLocalHost();
String IPAddress = thisIp.getHostAddress();
and import this package
import java.net.*;
Regards,
Pradeep Kumar G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anibal,
Glad it worked.
With the code snippet you provided, you will only get the client's hostname (or ip address, if hostname cannot be determined)
If you need to determine the current user, use the following code:
try {
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IUser user = wdUser.getSAPUser();
} catch (WDUMException e) {
// do your error handling here
}
return user;
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.