• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Servlet Headers Problem

Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anybody help me from this headers problem.
i added the code in servlets like
i am sending the headrs to another servlet. there i am trying to
print the header value with this
String val = request.getHeader("somestring"); but i am getting null
value can any body tell me why i am getting null value. Thanks in
[ August 02, 2005: Message edited by: Phanindra varma ]
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont understand fully what you are trying to achieve there.

You are adding a header to response and try to extract it from reqyest.

Perhaps I should highlight it that response is what you send to the client, it is viewable at the browser that requested the content . You can see the header you set if you view the headers of the response page opened at the client browser.

But the request headers are sent by the browswer, you cant control them from the server.

If you want to have some information sent along the response and have the client send it back to you , you need to use the cookies.
That feels good. Thanks. Here's a tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic