I want to develop a java servlet able to authenticate via HTTP protocol on an other server. That server sends back a cookie to my servlet and i want to forward back to the browser that cookie and redirect the browser to another url.
I can not figure out how to intercept and sendBack cookie via servlet.
Do you have any suggestions on method or class to be used?
I didn’t catch what you mean ‘intercept cookie’, but sending back cookie is quite simple just add cookie to response object.
And then forward your request:
Hope it’s helpful for you.