String path = request.getContextPath()
request.getRemoteHost()
3.得到登录计算机的IP
request.getRemoteAddr()
Map<String, String>map = System.getenv()String userName = map.get("USERNAME")// 获取用户名
String computerName = map.get("COMPUTERNAME")// 获取计算机名
String userDomain = map.get("USERDOMAIN")// 获取计算机域名
System.out.println(userName)
System.out.println(computerName)
System.out.println(userDomain)
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)