Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting the Server Name from request object

 
Ravi Sankar
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe this helps...

http://www.java-tips.org/java-ee-tips/java-servlet/how-to-get-information-about-the-server-using-se-2.html
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check ServletRequest methods , this facility is there .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic