aspose file tools*
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
 
wood burning stoves
 
subject: about response headers