Community
Participate
Working Groups
I have a url which internally redirects me to another localhost server, which is nothing but a dummy server that is not running.I just have to intercept the redirect url, but the location listener does not catch this redirection.It just says that the page cannot be loaded.
Can you please upload a small snippet of code which demonstrates the problem?
Here it is: Browser browser = new Browser(browserShell, SWT.Resize); browserShell.setSize(580, 550); browser.setSize(browserShell.getSize()); GridDataFactory.fillDefaults().grab(true, true).applyTo(browserShell); GridDataFactory.fillDefaults().grab(true, true).applyTo(browser); browser.setUrl("url"); browser.addLocationListener(new LocationListener() { @Override public void changing(LocationEvent event) { // TODO Auto-generated method stub System.out.println(event.location); } @Override public void changed(LocationEvent event) { // TODO Auto-generated method stub System.out.println(event.location); if (event.location.startsWith("http://localhost")) { }}}); The url here is a server which redirects to another url.This redirect url comes as a part of the response header.
Hey, Any progress on the issue?
Hi Guys, This is really creating problems for me,hence raising the prio.
Created attachment 253225 [details] TestSnippet --- WORKS_FOR_ME on IE10_Win7 This scenario works for me on Windows7 on IE10, tried opening www.google.com which in India internally redirects to www.google.co.in Test results with my Snippet, on console: changed...about:blank changing...http://www.google.com/ changing...http://www.google.co.in/?gfe_rd=cr&ei=fxNKVdPdDNCCuASgsoCwAQ changing...https://www.google.co.in/?gfe_rd=cr&ei=fxNKVdPdDNCCuASgsoCwAQ&gws_rd=ssl changed...https://www.google.co.in/?gfe_rd=cr&ei=fxNKVdPdDNCCuASgsoCwAQ&gws_rd=ssl changed...https://www.google.co.in/?gfe_rd=cr&ei=fxNKVdPdDNCCuASgsoCwAQ&gws_rd=ssl changed...https://www.google.co.in/?gfe_rd=cr&ei=fxNKVdPdDNCCuASgsoCwAQ&gws_rd=ssl If the attached test snippet fails for your, please revert with your Browser version and any specific information to reproduce this issue at our end ? Thanks.
Hi, I recently found out that the if the internal redirection is to a url which is of a server that is not up and running , of course the page cannot be loaded but the event for this url is not fired. For any server that is running the event is generated. For example: if google redirects to a localhost server which is not running , the event wont be generated ,however if redirection is to google.co.in, it will work. But i think the correct behaviour should be to generate events for both since there was an attempt to load a new url irrespective of whether the server is running. JAVAFX works this way. It generates events for both. Hence i think this should be fixed. Regards, Abhinav.
I totally agree. I have the same issue. (In reply to abhinav anand from comment #6) > Hi, > I recently found out that the if the internal redirection is to a url which > is of a server that is not up and running , of course the page cannot be > loaded but the event for this url is not fired. For any server that is > running the event is generated. > For example: if google redirects to a localhost server which is not running > , the event wont be generated ,however if redirection is to google.co.in, it > will work. > > But i think the correct behaviour should be to generate events for both > since there was an attempt to load a new url irrespective of whether the > server is running. > JAVAFX works this way. It generates events for both. > Hence i think this should be fixed. > > > Regards, > Abhinav.