Question

2
Replies
1373
Views
Close popover
Kunal Barua (KunalB63)
Marsh

Marsh
IN
KunalB63 Member since 2015 1 post
Marsh
Posted: January 23, 2018
Last activity: January 24, 2018
Closed

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]

Security
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.