i am trying to gain user's ip address via listenner but ı couldnt success
public void attributeAdded(HttpSessionBindingEvent arg0) {
try {
FileWriter file = new FileWriter("C:/authentication_log.txt");
session = arg0.getSession();
String ip = (String) session.getAttribute("ip");
file.write(ip +": "+new Date()+"\n");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---