+ /**\r
+ * open a URL in the browser - resolving it according to relative refs and\r
+ * coping with javascript: protocol if necessary.\r
+ * \r
+ * @param url\r
+ * @param target\r
+ */\r
+ public void showURL(String url, String target)\r
+ {\r
+ try\r
+ {\r
+ if (url.indexOf(":") == -1)\r
+ {\r
+ // TODO: verify (Bas Vroling bug) prepend codebase or server URL to\r
+ // form valid URL\r
+ // Should really use docbase, not codebase.\r
+ URL prepend;\r
+ url = resolveUrlForLocalOrAbsolute(\r
+ url,\r
+ prepend = getDefaultParameter("resolvetocodebase", false) ? getDocumentBase()\r
+ : getCodeBase());\r
+ if (debug)\r
+ {\r
+ System.err\r
+ .println("Show url (prepended "\r
+ + prepend\r
+ + " - toggle resolvetocodebase if code/docbase resolution is wrong): "\r
+ + url);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (debug)\r
+ {\r
+ System.err.println("Show url: " + url);\r
+ }\r
+ }\r
+ if (url.indexOf("javascript:") == 0)\r
+ {\r
+ // no target for the javascript context\r
+ getAppletContext().showDocument(new java.net.URL(url));\r
+ }\r
+ else\r
+ {\r
+ getAppletContext().showDocument(new java.net.URL(url), target);\r
+ }\r
+ } catch (Exception ex)\r
+ {\r
+ ex.printStackTrace();\r
+ }\r