Merges Struts 2 ClassLoaderUtils into XWork 2 ClassLoaderUtil

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1302821 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Lukasz Lenart
2012-03-20 10:17:37 +00:00
parent b5a58f1b90
commit f01f6e3cfe
15 changed files with 163 additions and 273 deletions
@@ -21,15 +21,24 @@
package org.apache.struts2.codebehind;
import com.opensymphony.xwork2.*;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.Result;
import com.opensymphony.xwork2.UnknownHandler;
import com.opensymphony.xwork2.XWorkException;
import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.config.entities.*;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.InterceptorLocator;
import com.opensymphony.xwork2.config.entities.PackageConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.config.entities.ResultTypeConfig;
import com.opensymphony.xwork2.config.providers.InterceptorBuilder;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.struts2.util.ClassLoaderUtils;
import javax.servlet.ServletContext;
import java.net.MalformedURLException;
@@ -253,7 +262,7 @@ public class CodebehindUnknownHandler implements UnknownHandler {
LOG.debug("Loaded template '" + path + "' from servlet context.");
}
} else {
template = ClassLoaderUtils.getResource(stripLeadingSlash(path), getClass());
template = ClassLoaderUtil.getResource(stripLeadingSlash(path), getClass());
if (template != null && LOG.isDebugEnabled()) {
LOG.debug("Loaded template '" + stripLeadingSlash(path) + "' from class path.");
}