Reverts back to XWork logging layer

This commit is contained in:
Lukasz Lenart
2015-11-28 15:57:52 +01:00
parent 27aa7e1e27
commit 696e566279
4 changed files with 15 additions and 15 deletions
@@ -23,11 +23,11 @@ import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import freemarker.ext.beans.BeanModel;
import freemarker.template.Configuration;
import freemarker.template.TemplateException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.views.JspSupportServlet;
import org.apache.struts2.views.freemarker.FreemarkerManager;
@@ -47,7 +47,7 @@ import java.io.IOException;
public class StrutsFreeMarkerAttributeRenderer extends AbstractTypeDetectingAttributeRenderer {
private static Logger LOG = LogManager.getLogger(StrutsFreeMarkerAttributeRenderer.class);
private static Logger LOG = LoggerFactory.getLogger(StrutsFreeMarkerAttributeRenderer.class);
@Override
public void write(Object value, Attribute attribute, TilesRequestContext request) throws IOException {
@@ -181,7 +181,7 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
DefinitionPatternMatcherFactory wildcardFactory = new WildcardDefinitionPatternMatcherFactory();
DefinitionPatternMatcherFactory regexpFactory = new RegexpDefinitionPatternMatcherFactory();
PrefixedPatternDefinitionResolver<T> resolver = new PrefixedPatternDefinitionResolver<>();
PrefixedPatternDefinitionResolver<T> resolver = new PrefixedPatternDefinitionResolver<T>();
resolver.registerDefinitionPatternMatcherFactory(PATTERN_WILDCARD, wildcardFactory);
resolver.registerDefinitionPatternMatcherFactory(PATTERN_REGEXP, regexpFactory);
@@ -192,7 +192,7 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
protected List<URL> getSourceURLs(TilesApplicationContext applicationContext,
TilesRequestContextFactory contextFactory) {
try {
Set<URL> finalSet = new HashSet<>();
Set<URL> finalSet = new HashSet<URL>();
Set<URL> webINFSet = applicationContext.getResources("/WEB-INF/**/tiles*.xml");
Set<URL> metaINFSet = applicationContext.getResources("classpath*:META-INF/**/tiles*.xml");
@@ -239,24 +239,24 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
PropertyAccessor objectPropertyAccessor = OgnlRuntime.getPropertyAccessor(Object.class);
PropertyAccessor mapPropertyAccessor = OgnlRuntime.getPropertyAccessor(Map.class);
PropertyAccessor applicationContextPropertyAccessor =
new NestedObjectDelegatePropertyAccessor<>(
new NestedObjectDelegatePropertyAccessor<TilesRequestContext>(
new TilesApplicationContextNestedObjectExtractor(),
objectPropertyAccessor);
PropertyAccessor requestScopePropertyAccessor =
new NestedObjectDelegatePropertyAccessor<>(
new NestedObjectDelegatePropertyAccessor<TilesRequestContext>(
new RequestScopeNestedObjectExtractor(), mapPropertyAccessor);
PropertyAccessor sessionScopePropertyAccessor =
new NestedObjectDelegatePropertyAccessor<>(
new NestedObjectDelegatePropertyAccessor<TilesRequestContext>(
new SessionScopeNestedObjectExtractor(), mapPropertyAccessor);
PropertyAccessor applicationScopePropertyAccessor =
new NestedObjectDelegatePropertyAccessor<>(
new NestedObjectDelegatePropertyAccessor<TilesRequestContext>(
new ApplicationScopeNestedObjectExtractor(), mapPropertyAccessor);
PropertyAccessorDelegateFactory<TilesRequestContext> factory =
new TilesContextPropertyAccessorDelegateFactory(
objectPropertyAccessor, applicationContextPropertyAccessor,
requestScopePropertyAccessor, sessionScopePropertyAccessor,
applicationScopePropertyAccessor);
PropertyAccessor tilesRequestAccessor = new DelegatePropertyAccessor<>(factory);
PropertyAccessor tilesRequestAccessor = new DelegatePropertyAccessor<TilesRequestContext>(factory);
OgnlRuntime.setPropertyAccessor(TilesRequestContext.class, tilesRequestAccessor);
return new OGNLAttributeEvaluator();
} catch (OgnlException e) {
@@ -19,8 +19,8 @@
package org.apache.struts2.tiles;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.tiles.TilesApplicationContext;
import org.apache.tiles.factory.AbstractTilesContainerFactory;
import org.apache.tiles.servlet.wildcard.WildcardServletTilesApplicationContext;
@@ -30,7 +30,7 @@ import javax.servlet.ServletContext;
public class StrutsTilesInitializer extends AbstractTilesInitializer {
private static final Logger LOG = LogManager.getLogger(StrutsTilesInitializer.class);
private static final Logger LOG = LoggerFactory.getLogger(StrutsTilesInitializer.class);
@Override
protected TilesApplicationContext createTilesApplicationContext(TilesApplicationContext preliminaryContext) {
@@ -19,8 +19,8 @@
package org.apache.struts2.tiles;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.tiles.startup.TilesInitializer;
import org.apache.tiles.web.startup.AbstractTilesListener;