mirror of
https://github.com/apache/struts.git
synced 2026-08-11 09:36:57 +00:00
Improved how properties are loaded, added closing tr tag for debug tag
WW-1746 WW-1712 git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@539688 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -29,6 +29,7 @@ import java.util.Properties;
|
||||
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 @@ class PropertiesSettings extends Settings {
|
||||
*/
|
||||
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");
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user