• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Header

 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


after 10 sec it redirect to C.jsp
but in C.jsp i get only null, please let me me why i get null ?

 
Paul Clapham
Sheriff
Pie
Posts: 20719
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question is about servlets, not Websphere. Moving.
 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case of redirect new request will come to JSP so will lose anything you set in previous request. You can use request dispatcher to achive your goal.
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shivendra tripathi wrote:In case of redirect new request will come to JSP so will lose anything you set in previous request. You can use request dispatcher to achive your goal.



No you can't. anything set in Header is used by the Client browsers and is not to store values in the application. Its common misleading statement. The values set in response headers are no way available in subsequent request. This is not the way it works.
 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have never written anything about assessing response header by a resource in application. I am taking about passing request to other resource using RequestDispatcher and I dont see any issue with that.
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

OP question is on request & response "headers" and not in request dispatchers.
 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

OP question is on request & response "headers" and not in request dispatchers.

Can you elaborate your comments. I didnt get that.
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

No you can't. anything set in Header is used by the Client browsers and is not to store values in the application. Its common misleading statement. The values set in response headers are no way available in subsequent request. This is not the way it works.


you mean that name can be only which is in the below list

Cache-Control
Pragma
Connection
Retry-After
Expires
Location
WWW-Authenticate
Content-Encoding
Location
Refresh

if i missed out . please let me me know when can i find the full list ?
i get these information from http header

 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


you mean that name can be only which is in the below list


not necessarily , the headers that you have added might be used by Client Browsers if it can interpret it. But certainly not sent in the subsequent response.


if i missed out . please let me me know when can i find the full list ?


request getHeaderNames() should provide most of them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic