Reputation: 1446
If I use the following lines of code in Java I will be redirected to a newpage.html in the same window and frame where the applet's HTML page is (page.html). I am trying to mask the URL so that it still displays page.html in the address bar of the browser when I am redirected to newpage.html.
How would I do this?
URL url = new URL(getCodeBase().getProtocol(), getCodeBase().getHost(), getCodeBase().getPort(), "/newpage.html");
getAppletContext().showDocument(url, "_self");
Upvotes: 0
Views: 142
Reputation: 12362
Difficult to give a proper answer without understanding the rational for doing this.
However, maybe page.html
can load a file which uses an iframe, and the iframe reloads. This way the page URL will still be page.html
.
Upvotes: 0