struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [24/50] [abbrv] struts git commit: Uses new way to access TileContainer
Date Fri, 15 Jul 2016 13:18:51 GMT
Uses new way to access TileContainer


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

Branch: refs/heads/master
Commit: 07488866b665a30ba66602a48071d03076a81994
Parents: 9249aac
Author: Lukasz Lenart <lukasz.lenart@gmail.com>
Authored: Tue Jan 12 10:14:11 2016 +0100
Committer: Lukasz Lenart <lukasz.lenart@gmail.com>
Committed: Tue Jan 19 16:18:42 2016 +0100

----------------------------------------------------------------------
 .../apache/struts2/views/tiles/TilesResult.java    | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/07488866/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java b/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
index 72d7916..a402869 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
@@ -30,7 +30,11 @@ import org.apache.struts2.result.ServletDispatcherResult;
 import org.apache.tiles.TilesContainer;
 
 import com.opensymphony.xwork2.ActionInvocation;
-import org.apache.tiles.servlet.context.ServletUtil;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.servlet.ServletRequest;
+import org.apache.tiles.request.servlet.ServletUtil;
 
 /**
  * <!-- START SNIPPET: description -->
@@ -99,11 +103,14 @@ public class TilesResult extends ServletDispatcherResult {
 
         ServletContext servletContext = ServletActionContext.getServletContext();
 
-        TilesContainer container = ServletUtil.getContainer(servletContext);
+        ApplicationContext applicationContext = ServletUtil.getApplicationContext(servletContext);
+        TilesContainer container = TilesAccess.getContainer(applicationContext);
 
-        HttpServletRequest request = ServletActionContext.getRequest();
-        HttpServletResponse response = ServletActionContext.getResponse();
+        HttpServletRequest httpRequest = ServletActionContext.getRequest();
+        HttpServletResponse httpResponse = ServletActionContext.getResponse();
 
-        container.render(location, request, response);
+        Request request = new ServletRequest(applicationContext, httpRequest, httpResponse);
+
+        container.render(location, request);
     }
 }


Mime
View raw message