File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

response header

 
Pradeep Chandrasekharan Nair
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to get response header value from a URL?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic