This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sending values in Header using sendRedirect

 
vn us
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can i set a Header say "NAME" as the header name and value is "MYNAME" in the response object
and call the response.sendRedirect( url ) and Can i access the same header ( "NAME" ) in the redirected url?
That is
response.setHeader("NAME","MYNAME");
response.sendRedirect("http://myhost/servlet/MyServlet");
After request reaching to MyServert, Can I get the value of "NAME" from the Header?

Thanks,
AVNUS
 
Carl Trusiak
Sheriff
Posts: 3340
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never tested this, You could setup you own test case and see. Let us know what the results are.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unlikely. You would have to rely on the client browser to copy your response headers into its next request. As far as I'm aware there is no requirement or reason for a client to do this.
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic