get client Ip Address in Java HttpServletRequest Posted on 2023-05-032023-05-03 example 1: public String getUserAgent(HttpServletRequest request) { return request.getHeader("User-Agent"); }