my dog learned polymorphism*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about response headers
 
Similar Threads
How to add custom headers to SOAP request/response in JAX-WS Metro
Access Headers
Servlet Header
Response Headers
Can anybody help to getrid of this error?