This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes about response headers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "about response headers" Watch "about response headers" New topic
Author

about response headers

surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
I need to know the host name and the portnumber in which my server is running.

can i get that from response headers??

or else how can i get these details?

regards,
surendarprabu.R


SCJP 1.4
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Originally posted by surendar prabu:

can i get that from response headers??
or else how can i get these details?




There is no need of headers to do.
just use the methods getServerName, getServerPort of HttpServletRequest Interface with your ServletRequest object.



Check Doc HttpServletRequest
[ October 04, 2006: Message edited by: Saif Uddin ]

Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
GeeCON Prague 2014
 
subject: about response headers