This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSP and the fly likes How to capture the server's name from the request? 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 » JSP
Bookmark "How to capture the server Watch "How to capture the server New topic
Author

How to capture the server's name from the request?

Sean Gildea
Ranch Hand

Joined: Jul 01, 2004
Posts: 81
Dear Ranchers,

I was wondering if anyone was familiar with a method of retrieving the name of the host server from the request or session.

I need to display it on a JSP page so our testers know which server is running that build.

Thanks!


SCJD, SCBCD, SCJP
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

Have you looked at the API javadocs for the HttpServletRequest class?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sean Gildea
Ranch Hand

Joined: Jul 01, 2004
Posts: 81
got it

request.getServerName()
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to capture the server's name from the request?
 
Similar Threads
File Download
how to get servername from a request but not the cluster name?
XML-RPC server deployment
How to request send to server or not
Generate HTTP PUT request