Thanks for reading this post.
I would like to edit the http header varible in one servlet and redirect/forward to another servlet, in this second servlet I should be able to retrive the header variable using request.getHeader("MY_HEADER_INFO"). The following are the options I tried out
Please share any thoughts in this regard.
Use the first option (forward). Also you can use a filter instead of the first servlet.
Thanks for the reply Marina,
The second servlet is actually runing on different context, hence I can't use dispatcher forward.I am sorry I didn't specify this earlier.
Browser has no obligations to return the header to context 2 you set in response object of context 1.
If you do not have a limitation of using request header I suggest you to go for a cookie based implementation.
Other wise you have to be smart enough of handling the request header in Apache/Iplanet in case you have.
If you need help on how to manipulate header in Apache I will be able to help you out. Other webservers are beyond my reach.
reach me at firstname.lastname@example.org