This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes response header Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply 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: 12268
    
    1
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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: response header
 
Similar Threads
Adding custom Header information to the HttpServletRequest object
How to find server name
renaming pdf file via servlet
set header and getheader
hai to all