Index: src/java/org/apache/cocoon/servlet/CocoonServlet.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v retrieving revision 1.44 diff -U3 -r1.44 CocoonServlet.java --- src/java/org/apache/cocoon/servlet/CocoonServlet.java 25 Nov 2002 14:06:38 -0000 1.44 +++ src/java/org/apache/cocoon/servlet/CocoonServlet.java 16 Jan 2003 01:28:56 -0000 @@ -92,6 +92,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.File; +import java.io.FileInputStream; import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; @@ -834,6 +835,7 @@ } final InputStream is = this.servletContext.getResourceAsStream(logkitConfig); + if (is == null) is = new FileInputStream(logkitConfig); final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); final Configuration conf = builder.build(is); logKitManager.configure(conf); @@ -880,6 +882,17 @@ String msg = "Init parameter 'configurations' is invalid : " + usedFileName; log.error(msg, mue); throw new ServletException(msg, mue); + } + + if (result == null) { + File resultFile = new File(usedFileName); + if (resultFile.isFile()) try { + result = resultFile.getCanonicalFile().toURL(); + } catch (Exception iomue) { + String msg = "Init parameter 'configurations' is invalid : " + usedFileName; + log.error(msg, mue); + throw new ServletException(msg, mue); + } } if (result == null) {