permaculture playing cards*
The moose likes Servlets and the fly likes response header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "response header" Watch "response header" New topic
Author

response header

Pradeep Chandrasekharan Nair
Ranch Hand

Joined: Apr 01, 2004
Posts: 48
how to get response header value from a URL?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
A URL is used in a request, not a response.
Assuming your really mean request header, look at the JavaDocs for the javax.servlet.http.HttpServletRequest interface. There you will find methods such as:
getHeader( String hdrname );
and other related methods. Anybody working with servlets should have a copy of the related JavaDocs - they come with Tomcat installations automatically.

If on the other hand you are talking about the URLConnection class in the java.net package, you will find methods such as getHeaderField( String name).
JavaDocs for the java.net package can be downloaded from the same place as the SDK - everybody working with Java should have them.
Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: response header
 
Similar Threads
hai to all
set header and getheader
renaming pdf file via servlet
How to find server name
Adding custom Header information to the HttpServletRequest object