aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt about header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt about header" Watch "Doubt about header" New topic
Author

Doubt about header

Arunabh Dash
Greenhorn

Joined: Apr 05, 2006
Posts: 20
HI friends ,
I have a doubt about the request header . Can anyone explain about the request header . I mean why it is needed .
And one more thing is that i came to know that , when we add a header a cookie is being added . Is it so ? If yes then can anyone explain how it happens .
with regards
Arunabh
Arunabh Dash
Greenhorn

Joined: Apr 05, 2006
Posts: 20
Please someone reply . I am not clear about the implementation of the header . In what point i will add some data in the header ???
And is it like when i add a header a cookie is being creater for that header ??
Expecting reply soon
Arunabh
Stary Kapec
Ranch Hand

Joined: Dec 04, 2005
Posts: 81
Here is an example of HTTP GET request, all below first line are request headers.



Request header is a name value pair. Every HTTP request includes few headers.
Some of them contain information about user's browser and its capabilities. For example if it supports compressed response or which encodings it can accept. These information can be used by the server to customize the response.


And one more thing is that i came to know that , when we add a header a cookie is being added


No, if you add a cookie in response to a request. The cookie will be send back, as a request header, by the browser with every following request. Browser will do it automatically provided it accepts cookies.


In what point i will add some data in the header


You can't. It is the job of a browser to properly set request headers. It happens automatically. But you can read the information contained in these headers.
[ January 10, 2007: Message edited by: Jasiek Motyka ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt about header