aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Practical Use for Header Values? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Practical Use for Header Values?" Watch "Practical Use for Header Values?" New topic
Author

Practical Use for Header Values?

Jack Gold
Ranch Hand

Joined: Feb 04, 2005
Posts: 85
I understand the passing of parameters and how cookies are used for session management, but how are user-defined header values useful??

HFSJ Ch4 introduces the addHeader("foo", "bar") and setHeader() methods, but does not discuss their practical use!
[ August 09, 2005: Message edited by: Jack Gold ]

SCJP 1.4<br />SCJD <br />SCWCD (Studying)
Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
setHeader might be used if you need to control stuff like cache.

response.setHeader("Cache-Control","no-store"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Practical Use for Header Values?