Hi Pascal, On Thu, Nov 6, 2014 at 11:41 AM, Pascal BASTIEN <[email protected]> wrote: > $request.getCookie("MyNiceCookie").value working well > This code too: > $request.cookies > #foreach($c in $request.cookies) > $c.getName() > #end > >
> I must open a bug about $cookietool? Because it seem it doesn't work on > 6.2.2. and 6.2.3... It doesn't work indeed. I reopened http://jira.xwiki.org/browse/XCOMMONS-627 because the cookie tool is a bit special compared to the other Velocity tools and we need to do something more to integrate it properly. If you need to read cookies then use the $request. If you need to create cookies from Velocity then you have to write a script service (at least for now). Sorry for this, Marius > Thxs god it is the BFD :-)) > > > > ________________________________ > De : Pascal BASTIEN <[email protected]> > À : Eduard Moraru <[email protected]>; XWiki Users <[email protected]> > Envoyé le : Jeudi 6 novembre 2014 10h03 > Objet : Re: [xwiki-users] cookies on Xwiki 6.2.3 > > > Your link answer at my question "how to use $cookietool?" ... but I didn't > manage either. > This xwiki code doesn't work: > $cookietool.add("awesomeCookieName","James is awesome",1) > #set ($cookieValue = $cookietool.get("awesomeCookieName").value) > My Cookie: $cookieValue > > In fact, I create succesfuly a cookie with javascript and I want get his > value in velocity code (and I didn't manage this part) > > Thxs > > > > > ________________________________ > De : Eduard Moraru <[email protected]> > À : Pascal BASTIEN <[email protected]>; XWiki Users <[email protected]> > Envoyé le : Jeudi 6 novembre 2014 0h01 > Objet : Re: [xwiki-users] cookies on Xwiki 6.2.3 > > > > Hi, > > Not sure I understand what the problem is exactly. > > Maybe this can help: http://www.velocitycoder.com/cookies/ > Found it on a random google search. > > Thanks, > Eduard > > > On Wed, Nov 5, 2014 at 8:25 PM, Pascal BASTIEN <[email protected]> > wrote: > > Hello, >> >>I try to use $cookietool without success... >>(I try to get my cookie with $request too but I didn't mange either) >> >>Any help to use it? >> >>My need, I created some cookie with javascript + onclick and I need to get >>them in my velocity code to avoid blinking during loading page (to hide some >>div if cookie is present) >> >> >>Thxs >> >>Pascal B >>_______________________________________________ >>users mailing list >>[email protected] >>http://lists.xwiki.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
