All, I inherited a codebase that calls HttpServletResponse.sendRedirect() to another page after a user is successfully logged in. I want to be able to insert a header value before that redirection is executed. I tried to simply add a HttpServletResponse.addHeader()/.setHeader() to the response object before the redirect is called, but it seems a new response object is used and sent to the browser. Is that assessment correct? Is there any way for me to modify the redirect before it's sent or do I have to use .forward()?
thx, - Joe