This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting the Server Name from request object
 
Similar Threads
spring mvc problem while doing Validation
how to get servername from a request but not the cluster name?
getting param value using EL pageContext.request obj
How to get header?
Explain why request parameter need to be added as attribute before forwarding