Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Cookie Support in BrowserField(AbstractBrowserField - No Cookie Support ?)
Cookie Support in BrowserField [message #957261] Thu, 25 October 2012 05:17 Go to next message
Walter Mising name is currently offline Walter Mising nameFriend
Messages: 128
Registered: July 2009
Senior Member
How can the cookies be retrieved from the response ?
Re: Cookie Support in BrowserField [message #964443 is a reply to message #957261] Tue, 30 October 2012 14:20 Go to previous message
Ken Lee is currently offline Ken LeeFriend
Messages: 97
Registered: March 2012
The browser field is currently restricted in its functions, i.e. it's only intended to show a specific website or local web content.

However, all UIs use org.eclipse.swt.browser.Browser behind the scene (have a look at SwingScoutBrowserField for example).
There's a static method called getCookie in the Browser class to retrieve cookies shared among all browser instances. getCookie(name, url) requires you to know the name of the cookie and the URL. So you might want to do something like this:

public class BrowserField extends AbstractBrowserField {
  protected void execLocationChanged(String location, String path, boolean local) {
    String myCookie = Browser.getCookie("myCookieName", location);

Previous Topic:Customized Swing Login Dialog
Next Topic:BridgeServlet: is not available.
Goto Forum:

Current Time: Sun Jun 24 05:38:27 GMT 2018

Powered by FUDForum. Page generated in 0.01827 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top