![](/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.