If you have the request object you can String remoteAddr = pRequest.getRemoteAddr(); String remoteHost = pRequest.getRemoteHost(); InetAddress pInetAddress = InetAddress.getByName(remoteAddr); pInetAddress.getHostAddress(); // gets the IP pInetAddress.getHostName();
I don't know on top of my head how to get from the session. Srikanth -----Original Message----- From: Hendrik Neumann [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 5:26 AM To: users@myfaces.apache.org Subject: Re: What is happening to the session if a user closes his browser? Thank you very much for your answers Pierpaolo and Mathias. I have just implemented Mathias' solution with the Session-Listener and it works perfect! By the way: is it possivle to get the ip-address associated with a session? I have not found a method like getIPAdress() and the method myHttpSessionEvent.getSource() does also not contain the ip address. Is there another solution to get it, because I want to write something like "Session created for 127.0.0.1" in my logfile. Is it possible? __________________________________________________________ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201