Saurabh Pillai wrote:By modify, I mean adding new values, (String,value) pair from Java class. There is getHeader but no setHeader method.
The request comes from the client. You can change it on the server: by the use of a servlet filter. As other people mentioned, there should not be many situations when you need to do that, however if you do need, register and implement a filter.
In my web app, at some point we are retrieving the values from header using request.getHeader() method. Now, this values get set from another app. It's like you login to some portal and you have multiple web apps available to use. Now, we don't have any access to the code where values get set in header. But during development, I need to mimic this so I was wondering how the values get set into header? Later on I thought of correct solution to just bypass that code. Now all is well.
But I found out that you actually set the header in response. Now this leads me to another question, I am almost positive, that login to portal and my web app both are different web app. so are they linked through something like ,