bloritsch 00/11/15 07:24:07
Modified: src/org/apache/cocoon/servlet Tag: xml-cocoon2
CocoonServlet.java
Log:
Adjusted method of finding the configuration file. It makes Cocoon
friendlier with
other Servlet engines that don't have the Handler needed for the "classpath:"
URL.
Revision Changes Path
No revision
No revision
1.1.4.28 +4 -3
xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java
Index: CocoonServlet.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java,v
retrieving revision 1.1.4.27
retrieving revision 1.1.4.28
diff -u -r1.1.4.27 -r1.1.4.28
--- CocoonServlet.java 2000/11/14 15:08:28 1.1.4.27
+++ CocoonServlet.java 2000/11/15 15:24:07 1.1.4.28
@@ -47,7 +47,7 @@
* (Apache Software Foundation, Exoffice Technologies)
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Nicola Ken Barozzi</a> Aisa
- * @version CVS $Revision: 1.1.4.27 $ $Date: 2000/11/14 15:08:28 $
+ * @version CVS $Revision: 1.1.4.28 $ $Date: 2000/11/15 15:24:07 $
*/
public class CocoonServlet extends HttpServlet {
@@ -117,8 +117,9 @@
}
try {
- this.configFile = new
File(this.context.getResource(configFileName).getFile());
- } catch (java.net.MalformedURLException mue) {
+ this.configFile = new
File(this.context.getRealPath(configFileName));
+ } catch (Exception mue) {
+ this.context.log("Servlet initialization argument
'configurations' not found at " + configFileName, mue);
log.error("Servlet initialization argument 'configurations' not
found at " + configFileName, mue);
throw new ServletException("Servlet initialization argument
'configurations' not found at " + configFileName);
}