Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get servername from a request but not the cluster name?

 
labi laba
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
how do i get server name from the request? This is the scenario, When ever a request is made, its handed to a cluster and then directed to one of the server in the cluster.
When i say request.getServerName();---- This is giving me the cluster name and not the server name. Say cluster1 has server1 and server2 and request is dispatched to any of one these servers. request.getServerName() - gives me cluster1 but I need to get server1/server2.
any suggestions/idea ? Thanks alot in advance.
 
Parham Emami
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

Have you tried this one?
request.getSession(true).getServletContext().getServerInfo();

I hope it might help.

Cheers
Parham
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic