wood burning stoves 2.0*
The moose likes Java in General and the fly likes how to get servername from a request but not the cluster name?    Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to get servername from a request but not the cluster name?    " Watch "how to get servername from a request but not the cluster name?    " New topic
Author

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

labi laba
Greenhorn

Joined: Apr 11, 2008
Posts: 9
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

Joined: Jul 11, 2003
Posts: 15
Hello there,

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

I hope it might help.

Cheers
Parham
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get servername from a request but not the cluster name?
 
Similar Threads
StagedTargets,Targets and cluster
How to replicate Singleton Data to all servers in Cluster
How to use an EJB, deployed in another server?
cluster in wls6.1 on hp-ux
Failover Testing