top of page

Identifying Midtier behind LB

Our client would like to identify the current midtier where he is already logged in, but he is using HA environment.

file: Login jsp

Hostname + IP address

InetAddress inetAddress = InetAddress.getLocalHost(); out.println("<span>Server: "+inetAddress.getHostName()+" ("+inetAddress.getHostAddress()+")</span>");

IP address of client

String cliIpAdd = request.getHeader("X-FORWARDED-FOR"); if(cliIpAdd == null) { cliIpAdd = request.getRemoteAddr(); } out.println("<span>Client: "+cliIpAdd+"</span><br>");

Client version



bottom of page