aspose file tools*
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 Java 8 in Action this week in the Java 8 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
Explain why request parameter need to be added as attribute before forwarding
How to get header?
getting param value using EL pageContext.request obj
how to get servername from a request but not the cluster name?
spring mvc problem while doing Validation