On 9/8/2016 4:47 AM, Terence M. Bandoian wrote:
On 9/6/2016 2:36 PM, Joe Tseng wrote:
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
Rather than using sendRedirect, it should be possible to set any
required headers and the status code using setHeader and setStatus.
-Terence Bandoian
http://www.tmbsw.com/
Sorry about responding directly - I meant for my reply to go to the list.
-Terence
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org