Jsf + pegar ip e mac da maquina que esta fazendo login

Preciso desenvolver um sistema de login com jsf, que ao usuario autenticar me retorne o ip e o mac da maquina do usuario que esta autenticando.
Ja tentei usar InetAddress, NetworkInterface. Onde ele me retorna o mac e o ip do servidor q esta armazenado minha aplicação.

Como fazer para pegar o mac e o ip da maquina que esta fetuando o login???

Valewwww

ip é mais simples:

http://www.guj.com.br/posts/list/49812.java

Agora o mac já não sei, provavelmente tera que usar um applet ou algum activex para obter esse tipo de informação…

Ip FacesContext fc = FacesContext.getCurrentInstance(); HttpServletRequest request = (HttpServletRequest) fc.getExternalContext().getRequest(); String ip = request.getRemoteAddr();
MacAddress public String getMACAddress(String ip){ String str = ""; String macAddress = ""; try { Process p = Runtime.getRuntime().exec("nbtstat -A " + ip); InputStreamReader ir = new InputStreamReader(p.getInputStream()); LineNumberReader input = new LineNumberReader(ir); for (int i = 1; i < 100; i++) { str = input.readLine(); if (str != null) { if (str.indexOf("MAC Address") > 1) { macAddress = str.substring(str.indexOf("MAC Address") + 14, str.length()); break; } } } } catch (IOException e) { e.printStackTrace(System.out); } return macAddress; }

[quote=Gbzao!]
MacAddress public String getMACAddress(String ip){ String str = ""; String macAddress = ""; try { Process p = Runtime.getRuntime().exec("nbtstat -A " + ip); InputStreamReader ir = new InputStreamReader(p.getInputStream()); LineNumberReader input = new LineNumberReader(ir); for (int i = 1; i < 100; i++) { str = input.readLine(); if (str != null) { if (str.indexOf("MAC Address") > 1) { macAddress = str.substring(str.indexOf("MAC Address") + 14, str.length()); break; } } } } catch (IOException e) { e.printStackTrace(System.out); } return macAddress; } [/quote]

ihhh, não sei não se funciona assim, talvés pra um rede interna, mas externa o buraco é mais em baixo…
bom, mas testa ai, e depois posta pra gente se funcionou…