Home » Eclipse Projects » Eclipse Platform » Retrieve cookies from introPart
Retrieve cookies from introPart [message #515371] |
Thu, 18 February 2010 10:18  |
Eclipse User |
|
|
|
Hello,
I need to retrieve a cookie from a Web navigation in the intro part. Indeed, the intro part contains a link to an external URL, user can browse the site with it, and the site sets a cookue. I need this cookie in an IIntroAction that can be started when clicking a link.
I found the Browser.getCookie("cookieId", "http://www.bonitasoft.org") would do the trick, however this always return me null...
Does anyone have an advice, a snippet or an idea for me, please?
Regards,
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
|
|
|
Re: Retrieve cookies from introPart [message #515551 is a reply to message #515371] |
Fri, 19 February 2010 05:55   |
Eclipse User |
|
|
|
Cross-post to SWT forum to increase probability of answer.
Mickael Istria a écrit :
> Hello,
>
> I need to retrieve a cookie from a Web navigation in the intro part.
> Indeed, the intro part contains a link to an external URL, user can
> browse the site with it, and the site sets a cookue. I need this cookie
> in an IIntroAction that can be started when clicking a link.
>
> I found the Browser.getCookie("cookieId", "http://www.bonitasoft.org")
> would do the trick, however this always return me null...
>
> Does anyone have an advice, a snippet or an idea for me, please?
>
> Regards,
> --
> Mickael Istria - BonitaSoft S.A.
> http://www.bonitasoft.com/products/downloads.php
|
|
| |
Re: Retrieve cookies from introPart [message #515668 is a reply to message #515621] |
Fri, 19 February 2010 07:24   |
Eclipse User |
|
|
|
Hello Grant,
Yes, our app starts a brower from time to time. We don't force it to use style SWT.MOZILLA, but since I run on Linux, it is probably implicit. For example, I imagine that, on Linux, the introPart opens a browser with such style, doesn't it?
Could you please give me the id of this bug? I did not succeed to find it in Bugzilla. Is it planned to be fixed in 3.5.2?
Regards
Grant Gayed a écrit :
> Hi Mickael,
>
> Does your app create a Browser with style SWT.MOZILLA at any point? If so
> then it's possible that you're seeing an swt bug that was recently fixed.
>
> Otherwise, are your cookie name and url definitely right? To confirm this
> try navigating to the site and invoking
> browser.execute("alert(document.cookie)").
>
> HTH,
> Grant
>
>
> "Mickael Istria" <mickael.istria@bonitasoft.com> wrote in message
> news:hllqn9$8de$1@build.eclipse.org...
>> Cross-post to SWT forum to increase probability of answer.
>>
>> Mickael Istria a écrit :
>>> Hello,
>>>
>>> I need to retrieve a cookie from a Web navigation in the intro part.
>>> Indeed, the intro part contains a link to an external URL, user can
>>> browse the site with it, and the site sets a cookue. I need this cookie
>>> in an IIntroAction that can be started when clicking a link.
>>>
>>> I found the Browser.getCookie("cookieId", "http://www.bonitasoft.org")
>>> would do the trick, however this always return me null...
>>>
>>> Does anyone have an advice, a snippet or an idea for me, please?
>>>
>>> Regards,
>>> --
>>> Mickael Istria - BonitaSoft S.A.
>>> http://www.bonitasoft.com/products/downloads.php
>
>
--
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
|
|
|
Re: Retrieve cookies from introPart [message #516072 is a reply to message #515668] |
Mon, 22 February 2010 11:43   |
Eclipse User |
|
|
|
The bug I referred to would only happen when Browsers with styles SWT.NONE
and SWT.MOZILLA are both being used, an SWT.NONE-style Browser that uses
mozilla as its renderer would not see this problem. There wasn't a report
for the bug, I just stumbled across it and fixed it when I was writing my
previous response. If you want to see if this fix helps your case then you
can try getting tomorrow's integration build, but I don't think it will make
a difference. And it's not planned for 3.5.2, it's too late in the 3.5.2
cycle to add a change like this.
So assuming that this is a different problem, can you replace your
"getCookie()" call with "alert(document.cookie)" to confirm that the cookie
you're expecting to find is definitely set with the expected name? And is
the page that sets the cookie definitely completed loading before you make
the call?
Grant
"Mickael Istria" <mickael.istria@bonitasoft.com> wrote in message
news:hlmh8k$2ti$1@build.eclipse.org...
> Hello Grant,
>
> Yes, our app starts a brower from time to time. We don't force it to use
style SWT.MOZILLA, but since I run on Linux, it is probably implicit. For
example, I imagine that, on Linux, the introPart opens a browser with such
style, doesn't it?
>
> Could you please give me the id of this bug? I did not succeed to find it
in Bugzilla. Is it planned to be fixed in 3.5.2?
>
> Regards
>
>
> Grant Gayed a
|
|
|
Re: Retrieve cookies from introPart [message #516103 is a reply to message #516072] |
Mon, 22 February 2010 13:39   |
Eclipse User |
|
|
|
Grant Gayed a écrit :
> The bug I referred to would only happen when Browsers with styles SWT.NONE
> and SWT.MOZILLA are both being used, an SWT.NONE-style Browser that uses
> mozilla as its renderer would not see this problem. There wasn't a report
> for the bug, I just stumbled across it and fixed it when I was writing my
> previous response. If you want to see if this fix helps your case then you
> can try getting tomorrow's integration build, but I don't think it will make
> a difference. And it's not planned for 3.5.2, it's too late in the 3.5.2
> cycle to add a change like this.
Ok, then this is probably nor related at all.
> So assuming that this is a different problem, can you replace your
> "getCookie()" call with "alert(document.cookie)" to confirm that the cookie
> you're expecting to find is definitely set with the expected name? And is
> the page that sets the cookie definitely completed loading before you make
> the call?
Thanks for the trick of invoking javascript programmatically, it is a very useful!
It seems that the cookies I am looking for are not available whenever I try to retrieve them (they don't appear in the alert box). The strange thing is that these cookies are added after a login operation on a page, and once logged in they don't seem to be lost, since I stay logged in all along my navigation. But I cannot retrieve them at any point.
When I watch my session with Firefox and Firebug, I clearly see those cookies added to my session when logging in. They are mandatory for most operations, and I can perform these operations in Eclipse browser...
Do you have any idea of why I cannot retrieve these cookies, that clearly seem to be here (otherwise, I would not see the same things in the browser) ?
Thanks in advance
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
|
|
| | | | | |
Goto Forum:
Current Time: Wed Jul 23 18:15:09 EDT 2025
Powered by FUDForum. Page generated in 0.06485 seconds
|