Hi I'm new to Oracle adf and i'm using this version Oracle IDE 12.2.1.3.42.170820.0914.
I am currently working on an Oracle ADF application.
I want to get the users system name when user logged into Adf application and i want to print that system name in my adf application server logs. I have added below line in one of my method to get the users system name.
try {
String computerName = InetAddress.getLocalHost().getHostName();
logger.warning(String.format("JUTI - " + LOGIN\_SUCCESSFUL + " : " + userInfo.getFullnameWithComma() +
" User machineId: " + computerName));
}
catch (Exception ex) {
String userName = ADFUtils.getADFContext().getSecurityContext().getUserName();
logger.severe("JUTI - Unable to retrive the machineId: " + ex + " for user: " + userName);
}
I'm getting the system name when i deploy the code locally. But when i the deploy the code into non-production environment it is printing the server hostname instead of user's system.
Can anyone help me here to sort out this issue.
Thanks in Advance