You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2016/03/26 16:15:12 UTC

[1/4] struts git commit: Reduces log verbosity in tests

Repository: struts
Updated Branches:
  refs/heads/master 2a09e8642 -> 6770b35ce


Reduces log verbosity in tests


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/e5d7be9a
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/e5d7be9a
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/e5d7be9a

Branch: refs/heads/master
Commit: e5d7be9a79d3ba1ad795d3a471930f441ae85ccb
Parents: 2a09e86
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sat Mar 26 15:25:19 2016 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Sat Mar 26 15:25:19 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/struts2/views/jsp/AbstractUITagTest.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/e5d7be9a/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java
index 108731e..ce33824 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/AbstractUITagTest.java
@@ -176,9 +176,7 @@ public abstract class AbstractUITagTest extends AbstractTagTest {
             tag.doStartTag();
             tag.doEndTag();
             String writerString = normalize(writer.toString(), true);
-            if (LOG.isInfoEnabled()) {
-                LOG.info("AbstractUITagTest - [verifyGenericProperties]: Tag output is " + writerString);
-            }
+            LOG.debug("AbstractUITagTest - [verifyGenericProperties]: Tag output is {}", writerString);
 
             assertFalse("Freemarker error detected in tag output: " + writerString, writerString.contains(normalize(FREEMARKER_ERROR_EXPECTATION)));
 


[3/4] struts git commit: Adds additional logging when locating definitions

Posted by lu...@apache.org.
Adds additional logging when locating definitions


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/f04eb383
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/f04eb383
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/f04eb383

Branch: refs/heads/master
Commit: f04eb3831a0053c36f8ae8901a1a573c5f974d8a
Parents: 42192a5
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sat Mar 26 15:36:14 2016 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Sat Mar 26 15:36:14 2016 +0100

----------------------------------------------------------------------
 .../struts2/tiles/StrutsWildcardServletApplicationContext.java     | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/f04eb383/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
index 0fa1bc3..70a21ed 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
@@ -115,6 +115,8 @@ public class StrutsWildcardServletApplicationContext extends ServletApplicationC
         Pattern pattern = WildcardUtil.compileWildcardPattern(path);
         Map<String, URL> matches = finder.getResourcesMap("");
 
+        LOG.trace("Found resources {} matching pattern {}", matches, path);
+
         for (String resource : matches.keySet()) {
             if (pattern.matcher(resource).matches()) {
                 URL url = matches.get(resource);


[2/4] struts git commit: Reports proper Tiles version integration

Posted by lu...@apache.org.
Reports proper Tiles version integration


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/42192a5c
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/42192a5c
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/42192a5c

Branch: refs/heads/master
Commit: 42192a5cee4f0ada30b4998653ad46ab8fe55463
Parents: e5d7be9
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sat Mar 26 15:26:05 2016 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Sat Mar 26 15:26:05 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/struts2/tiles/StrutsTilesListener.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/42192a5c/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java
index cf874b1..62adf63 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java
@@ -35,7 +35,7 @@ public class StrutsTilesListener extends AbstractTilesListener {
 
     @Override
     protected TilesInitializer createTilesInitializer() {
-        LOG.info("Starting Struts Tiles 2 integration ...");
+        LOG.info("Starting Struts Tiles 3 integration ...");
         return new StrutsTilesInitializer();
     }
 }
\ No newline at end of file


[4/4] struts git commit: Adds fallback to static config definitions to allow work in restricted envs eg. GAE

Posted by lu...@apache.org.
Adds fallback to static config definitions to allow work in restricted envs eg. GAE


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/6770b35c
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/6770b35c
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/6770b35c

Branch: refs/heads/master
Commit: 6770b35ce78f89f16646f15d303cddb46c8de34a
Parents: f04eb38
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sat Mar 26 16:14:54 2016 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Sat Mar 26 16:14:54 2016 +0100

----------------------------------------------------------------------
 .../apache/struts2/tiles/StrutsTilesInitializer.java   | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/6770b35c/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
index d0f32f0..1a69f8a 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesInitializer.java
@@ -21,8 +21,10 @@ package org.apache.struts2.tiles;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
+import org.apache.tiles.definition.DefinitionsFactory;
 import org.apache.tiles.factory.AbstractTilesContainerFactory;
 import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.servlet.ServletApplicationContext;
 import org.apache.tiles.startup.AbstractTilesInitializer;
 
 import javax.servlet.ServletContext;
@@ -33,8 +35,15 @@ public class StrutsTilesInitializer extends AbstractTilesInitializer {
 
     @Override
     protected ApplicationContext createTilesApplicationContext(ApplicationContext preliminaryContext) {
-        LOG.debug("Initializing Tiles wildcard support ...");
-        return new StrutsWildcardServletApplicationContext((ServletContext) preliminaryContext.getContext());
+        ServletContext servletContext = (ServletContext) preliminaryContext.getContext();
+
+        if (servletContext.getInitParameter(DefinitionsFactory.DEFINITIONS_CONFIG) != null) {
+            LOG.trace("Found definitions config in web.xml, using standard Servlet support ....");
+            return new ServletApplicationContext(servletContext);
+        } else {
+            LOG.trace("Initializing Tiles wildcard support ...");
+            return new StrutsWildcardServletApplicationContext(servletContext);
+        }
     }
 
     @Override