This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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?
 
Similar Threads
Regarding SOAP header relay attribute
What does this requirement mean?
how to use Valuestack
Hidden Fields
href link from jsp file to jsp file wich content is "application/pdf"