URL u1, u2; u1 = getDocumentBase(); System.out.println(u1); try { u2 = new URL(u1, "vendor.html"); System.out.println(u2); } catch (MalformedURLException e) { System.err.println(e); }