Author: mrdon Date: Fri May 18 22:15:32 2007 New Revision: 539689 URL: http://svn.apache.org/viewvc?view=rev&rev=539689 Log: Improved how properties are loaded, added closing tr tag for debug tag WW-1746 WW-1712
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java struts/struts2/trunk/core/src/main/resources/template/simple/debug.ftl Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java?view=diff&rev=539689&r1=539688&r2=539689 ============================================================================== --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java Fri May 18 22:15:32 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/trunk/core/src/main/resources/template/simple/debug.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/debug.ftl?view=diff&rev=539689&r1=539688&r2=539689 ============================================================================== --- struts/struts2/trunk/core/src/main/resources/template/simple/debug.ftl (original) +++ struts/struts2/trunk/core/src/main/resources/template/simple/debug.ftl Fri May 18 22:15:32 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>