public static String getIpInformation ( final WebBrowser webBrowser ) { String ipInformation = webBrowser . getAddress ( ) ; final HttpServletRequest httpRequest = ( ( ServletRequestAttributes ) RequestContextHolder . currentRequestAttributes ( ) ) . getRequest ( ) ; final String xForwardedForHeader = httpRequest . getHeader ( X_FORWARDED_FOR ) ; if ( xForwardedForHeader != null ) { final String [ ] split = xForwardedForHeader . split ( "," ) ; if ( split . length != 0 ) { ipInformation = split [ 0 ] ; } } return ipInformation ; }
Gets the ip information .