title: how to get tomcat host and port number in load balancing?
body: <p>I have successfully configured my <code>java</code> project with <code>load balancing</code> with <code>HTTP server</code> two <code>tomcat</code>. </p>
  
  <p>Now I need to know which tomcat serves my request ?</p>
  
  <p>For that , I need to get the tomcat host and port number and displaying it in the <code>jsp</code> .</p>
  
  <p>This is what I have tried,</p>
  
  <pre><code>&lt;%= "Server Name : "+ request.getServerName()+ " Port : "+ request.getServerPort()%&gt;
  </code></pre>
  
  <p>But I got the <code>HTTP server</code> <strong>port</strong> and <strong>host</strong> only.</p>
  
  <p>How can I show the host and port particular tomcat serve my request ?</p>