You are setting the headers in servlet(web component-server side) and forwarding to
JSP(another web component-server side) and trying to get the same header. How is it possible.
The method is called on "response" object, which means the result is send to the client. Using request.getHeader() you can access Headers that are send from the client and NOT send to the client.
Hope you can understand.