This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Servlets and the fly likes Getting the Server Name from request object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Getting the Server Name from request object" Watch "Getting the Server Name from request object" New topic
Author

Getting the Server Name from request object

Ravi Sankar
Ranch Hand

Joined: Aug 17, 2007
Posts: 49
Hi,

I want to get the servername where the application has been deployed. By using getServerName() method, I am able to get the Server's IP address. But I need to get the Server name. Could you provide me the details how to get the server name from the request object?
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Maybe this helps...

http://www.java-tips.org/java-ee-tips/java-servlet/how-to-get-information-about-the-server-using-se-2.html


JDBCSupport - An easy to use, light-weight JDBC framework -
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

check ServletRequest methods , this facility is there .


Save India From Corruption - Anna Hazare.
 
 
subject: Getting the Server Name from request object