Index: src/gnu/gcjwebplugin/AppletTag.java =================================================================== RCS file: /cvsroot/gcjwebplugin/gcjwebplugin/src/gnu/gcjwebplugin/AppletTag.java,v retrieving revision 1.31 diff -u -r1.31 AppletTag.java --- src/gnu/gcjwebplugin/AppletTag.java 19 Apr 2006 21:51:40 -0000 1.31 +++ src/gnu/gcjwebplugin/AppletTag.java 27 Apr 2006 19:06:55 -0000 @@ -393,7 +393,7 @@ documentbase = TagParser.db; URL fullcodebase; - + //If no codebase was specified, default to documentbase. if (codebase.equals("")) { @@ -403,7 +403,7 @@ { String dirname = documentbase.getFile(); - // Determine dirname for file by strippint everything + // Determine dirname for file by stripping everything // past the last file separator. dirname = dirname.substring(0, dirname.lastIndexOf(File.separatorChar) + 1); Index: src/gnu/gcjwebplugin/TagParser.java =================================================================== RCS file: /cvsroot/gcjwebplugin/gcjwebplugin/src/gnu/gcjwebplugin/TagParser.java,v retrieving revision 1.1 diff -u -r1.1 TagParser.java --- src/gnu/gcjwebplugin/TagParser.java 19 Apr 2006 21:51:40 -0000 1.1 +++ src/gnu/gcjwebplugin/TagParser.java 27 Apr 2006 19:06:55 -0000 @@ -260,7 +260,8 @@ // meant the root page. String f = tmpDocumentBase.getFile(); if (f.indexOf(".") == -1 && !f.endsWith(File.separator)) - tmpDocumentBase = new URL(location.concat(File.separator)); + if (new File(tmpDocumentBase.getFile()).isDirectory()) + tmpDocumentBase = new URL(location.concat(File.separator)); } catch (MalformedURLException e) { @@ -274,7 +275,7 @@ + location).getCanonicalPath(); tmpDocumentBase = new URL("file", "", path); - + if (new File(tmpDocumentBase.getFile()).isDirectory()) tmpDocumentBase = new URL("file", "", path + File.separator); }