public void execute() throws Exception { if (newLocation.startsWith(JAVASCRIPT_PREFIX)) { final String script = newLocation.substring(11); page.executeJavaScriptIfPossible(script, "new location value", 1); return; } try { final URL url = page.getFullyQualifiedUrl(newLocation); final URL oldUrl = page.getWebResponse().getRequestSettings().getUrl(); if (url.sameFile(oldUrl) && !StringUtils.equals(url.getRef(), oldUrl.getRef())) { // If we're just setting or modifying the hash, avoid a server hit. jsxSet_hash(newLocation); return; } final WebWindow webWindow = getWindow().getWebWindow(); webWindow.getWebClient().getPage(webWindow, new WebRequestSettings(url)); } catch (final MalformedURLException e) { LOG.error("jsxSet_location('" + newLocation + "') Got MalformedURLException", e); throw e; } catch (final IOException e) { LOG.error("jsxSet_location('" + newLocation + "') Got IOException", e); throw e; } } };
public void execute() throws Exception { if (newLocation.startsWith(JAVASCRIPT_PREFIX)) { final String script = newLocation.substring(11); page.executeJavaScriptIfPossible(script, "new location value", 1); return; } try { final URL url = page.getFullyQualifiedUrl(newLocation); final URL oldUrl = page.getWebResponse().getRequestSettings().getUrl(); if (url.sameFile(oldUrl) && !StringUtils.equals(url.getRef(), oldUrl.getRef())) { // If we're just setting or modifying the hash, avoid a server hit. jsxSet_hash(newLocation); return; } final WebWindow webWindow = getWindow().getWebWindow(); webWindow.getWebClient().getPage(webWindow, new WebRequestSettings(url)); } catch (final MalformedURLException e) { LOG.error("jsxSet_location('" + newLocation + "') Got MalformedURLException", e); throw e; } catch (final IOException e) { LOG.error("jsxSet_location('" + newLocation + "') Got IOException", e); throw e; } } };
public void execute() throws Exception { if (newLocation.startsWith(JAVASCRIPT_PREFIX)) { final String script = newLocation.substring(11); page.executeJavaScriptIfPossible(script, "new location value", 1); return; } try { final URL url = page.getFullyQualifiedUrl(newLocation); final URL oldUrl = page.getWebResponse().getRequestSettings().getUrl(); if (url.sameFile(oldUrl) && !StringUtils.equals(url.getRef(), oldUrl.getRef())) { // If we're just setting or modifying the hash, avoid a server hit. jsxSet_hash(newLocation); return; } final WebWindow webWindow = getWindow().getWebWindow(); webWindow.getWebClient().getPage(webWindow, new WebRequestSettings(url)); } catch (final MalformedURLException e) { LOG.error("jsxSet_location('" + newLocation + "') Got MalformedURLException", e); throw e; } catch (final IOException e) { LOG.error("jsxSet_location('" + newLocation + "') Got IOException", e); throw e; } } };