Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJWCD
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Web Component Certification (OCEJWCD)
set header and getheader
Harish Yerneni
Ranch Hand
Posts: 94
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am trying to print the value of a header and getting a null value as the output. Any ideas?
code:
resp.setHeader("foo","baris");
String
hvalue = req.getHeader("foo");
out.println("<br>foo value is"+ hvalue);
output:
foo value isnull
SCJP 1.4 | SCWCD 1.4 | SCJD (WIP)
Christophe Verré
Sheriff
Posts: 14691
16
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Are you doing this in the same
servlet
??
[My Blog]
All roads lead to JavaRanch
Harish Yerneni
Ranch Hand
Posts: 94
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
yes
SCJP 1.4 | SCWCD 1.4 | SCJD (WIP)
Christophe Verré
Sheriff
Posts: 14691
16
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You are setting the header to the response. Ok.
You are reading the request header. Ok.
But the request header and the response header are different.
[My Blog]
All roads lead to JavaRanch
Harish Yerneni
Ranch Hand
Posts: 94
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Satou.
I got it.
SCJP 1.4 | SCWCD 1.4 | SCJD (WIP)
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Use of .setHeader() and .addHeader() methods
Display of hashmap values using jstl
Passing variable into methods
Question about servlet filters
Stringbuffer remains unchanged in a method
More...