Skip to main content

Identifying Midtier behind LB
Identifying Midtier behind LB

·1 min read
Share

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("Server: "+inetAddress.getHostName()+" ("+inetAddress.getHostAddress()+")");

IP address of client

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

Client version

out.println(""+Configuration.getInstance().getClientVersion()+"
");

L

Lubos Strejcek

Content Writer at STREYDA