![](/img/trans.png)
[英]How can i get the username and domain name of client system in java as i can get the ip address and host name using request.getRemoteHost
[英]Client System Host Name is not captureing using request.getRemoteHost()
我們在jsp頁面中使用request.getRemoteHost()
來獲取客戶端的主機名,但它只會返回客戶端系統的IP地址。
還有其他方法可以從java-script,jsp,...獲取客戶端系統主機名。
如果服務器在false上具有enableLookups(例如對於Tomcat),則此getRemoteHost()將僅返回ip。 最簡單的解決方案是僅更改屬性並強制將ip解析為主機名。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.