svn commit: r903799 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r903799 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java

doogie-3
Author: doogie
Date: Wed Jan 27 19:50:17 2010
New Revision: 903799

URL: http://svn.apache.org/viewvc?rev=903799&view=rev
Log:
Fix for a memory leak; sometime during the past, the initial url fetched
from the servlet container started being a jndi:// form; so, when
include processing was introduced, the urls wouldn't match up.  Instead,
implement a temporary hack to convert the servlet path to a file, so
that the urls will be normalized.

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java?rev=903799&r1=903798&r2=903799&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java Wed Jan 27 19:50:17 2010
@@ -56,7 +56,7 @@
 
     public static URL getControllerConfigURL(ServletContext context) {
         try {
-            return context.getResource(controllerXmlFileName);
+            return new File(context.getRealPath(controllerXmlFileName)).toURI().toURL();
         } catch (MalformedURLException e) {
             Debug.logError(e, "Error Finding XML Config File: " + controllerXmlFileName, module);
             return null;