aspose file tools*
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
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?