mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-4044 Solves problem with infinitive loop when used with <s:action/> tag and attribute executeResult is set to "true"
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1536598 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -59,16 +59,23 @@ public class TilesResult extends ServletDispatcherResult {
|
||||
|
||||
@Override
|
||||
public void doExecute(String location, ActionInvocation invocation) throws Exception {
|
||||
setLocation(location);
|
||||
ServletContext context = ServletActionContext.getServletContext();
|
||||
ApplicationContext applicationContext = ServletUtil.getApplicationContext(context);
|
||||
TilesContainer container = TilesAccess.getContainer(applicationContext);
|
||||
|
||||
HttpServletRequest request = ServletActionContext.getRequest();
|
||||
HttpServletResponse response = ServletActionContext.getResponse();
|
||||
|
||||
ApplicationContext applicationContext = ServletUtil.getApplicationContext(context);
|
||||
ServletRequest servletRequest = new ServletRequest(applicationContext, request, response);
|
||||
|
||||
TilesContainer container = initTilesContainer(applicationContext, servletRequest);
|
||||
|
||||
container.startContext(servletRequest);
|
||||
container.render(location, servletRequest);
|
||||
}
|
||||
|
||||
protected TilesContainer initTilesContainer(ApplicationContext applicationContext, ServletRequest servletRequest) {
|
||||
TilesContainer container = TilesAccess.getContainer(applicationContext);
|
||||
TilesAccess.setCurrentContainer(servletRequest, container);
|
||||
return container;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user