struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r539688 - in /struts/struts2/branches/STRUTS_2_0_X/core/src/main: java/org/apache/struts2/config/PropertiesSettings.java resources/template/simple/debug.ftl
Date Sat, 19 May 2007 05:12:23 GMT
Author: mrdon
Date: Fri May 18 22:12:22 2007
New Revision: 539688

URL: http://svn.apache.org/viewvc?view=rev&rev=539688
Log:
Improved how properties are loaded, added closing tr tag for debug tag
WW-1746 WW-1712

Modified:
    struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
    struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/debug.ftl

Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java?view=diff&rev=539688&r1=539687&r2=539688
==============================================================================
--- struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
(original)
+++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
Fri May 18 22:12:22 2007
@@ -29,6 +29,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.struts2.StrutsException;
+import org.apache.struts2.util.ClassLoaderUtils;
 
 import com.opensymphony.xwork2.util.location.LocatableProperties;
 import com.opensymphony.xwork2.util.location.Location;
@@ -53,7 +54,7 @@
      */
     public PropertiesSettings(String name) {
         
-        URL settingsUrl = Thread.currentThread().getContextClassLoader().getResource(name
+ ".properties");
+        URL settingsUrl = ClassLoaderUtils.getResource(name + ".properties", getClass());
         
         if (settingsUrl == null) {
             LOG.debug(name + ".properties missing");

Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/debug.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/debug.ftl?view=diff&rev=539688&r1=539687&r2=539688
==============================================================================
--- struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/debug.ftl
(original)
+++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/debug.ftl
Fri May 18 22:12:22 2007
@@ -31,7 +31,7 @@
 
         <#assign renderRow=false>
         <#list stackObject.value.keySet() as propertyName>
-            <#if renderRow==true><tr><#else> <#assign renderRow=false>
</#if>
+            <#if renderRow==true></tr><tr><#else> <#assign renderRow=false>
</#if>
             <td bgcolor="<#if (index % 2) == 0>#BBBBBB<#else>#CCCCCC</#if>">${propertyName}</td>
             <td bgcolor="<#if (index % 2) == 0>#BBBBBB<#else>#CCCCCC</#if>"><#if
stackObject.value.get(propertyName)?exists>${stackObject.value.get(propertyName).toString()}<#else>null</#if></td>
     </tr>



Mime
View raw message