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 01:17 Go to next message
Walter Mising name is currently offline Walter Mising name
Messages: 126
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 10:20 Go to previous message
Ken Lee is currently offline Ken Lee
Messages: 97
Registered: March 2012
Member
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 {
  @Override
  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: Thu Jul 24 21:34:15 EDT 2014

Powered by FUDForum. Page generated in 0.01881 seconds