How to get the HTTP Response object inside the authentication activity?
Hi,
I am facing an issue where I need to access the HTTP Response object where I need to add a new custom cookie to be stored on the session.
I tried to access to Response object using the code below like we do for accessing the request header:
javax.servlet.http.HttpServletResponse res = (javax.servlet.http.HttpServletResponse)tools.getRequestor().getRequestorPage().getObject("pxHTTPServletResponse");
But the property pxHTTPServletResponse is not a standard PEGA property which holds the response headers so this is having null value in the object.
So I am getting null pointer exception when I am executing the below code:
res.addCookie(cookiename);
So can anyone please tell me how to access the Response Headers in PEGA and add the cookie to it? [Just an information this is not from any service calls]