{
try
{
- System.out.println("Show url: " + url);
+ if (url.indexOf(":")==-1)
+ {
+ // TODO: verify (Bas Vroling bug) prepend codebase or server URL to form valid URL
+ if (url.indexOf("/")==0)
+ {
+ String codebase = viewport.applet.getCodeBase().toString();
+ url = codebase.substring(0,codebase.length()-viewport.applet.getCodeBase().getFile().length())+url;
+ } else {
+ url = viewport.applet.getCodeBase()+url;
+ }
+ System.out.println("Show url (prepended codebase): " + url);
+ } else {
+ System.out.println("Show url: " + url);
+ }
viewport.applet.getAppletContext().showDocument(
new java.net.URL(url), target);
} catch (Exception ex)