Mohd Ahmed Khan created PLUTO-647:
-------------------------------------
Summary: Unable to set cookie in processAction
Key: PLUTO-647
URL: https://issues.apache.org/jira/browse/PLUTO-647
Project: Pluto
Issue Type: Bug
Components: portlet container
Affects Versions: 2.1.0-M3
Reporter: Mohd Ahmed Khan
Failing test case:
1) V2AddlResponseTests_SPEC2_12_Action_cookie1 - Cookies set during the Action
phase should be available to the portlet during the Render phase
I tried to set the cookie in processAction as follows -
Cookie c = new Cookie("tr0_cookie", "true");
c.setPath(portletReq.getProperty("Referer"));
portletResp.addProperty(c);
Then in render method we try to get the cookie -
Cookie[] cookies = portletReq.getCookies();
System.out.println(cookies.length);
for (Cookie c : cookies) {
System.out.println(c.getName() + " " + c.getValue());
}
It is not necessary that a portlet container send the cookie to client side.
The cookie "tr0_cookie" is also not visible on the client side. I tried setting
more parameters of cookie, but nothing worked. For e.g. -
c.setMaxAge(100);
c.setDomain("localhost");
c.setVersion(0);
I can't say for sure but, this might be a bug in pluto.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)