You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Mohd Ahmed Khan (JIRA)" <ji...@apache.org> on 2016/06/17 10:33:05 UTC

[jira] [Resolved] (PLUTO-647) Unable to set cookie in processAction

     [ https://issues.apache.org/jira/browse/PLUTO-647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mohd Ahmed Khan resolved PLUTO-647.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.4

Resolved by Scott.

> 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
>              Labels: test
>             Fix For: 2.0.4
>
>
> 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)