I want to call a web service that requires an authentication cookie.
I have the cookie name and value. but I don\'t know how to inject the cookie in the request.
There is no method for adding a cookie to an HttpRequest, but you can set a header or parameter.
HttpRequest
Cookies are added to the HttpServletResponse like this:
HttpServletResponse response; //initialized or passed in Cookie cookie = new Cookie("myname", "myvalue"); response.addCookie(cookie);