springtiles2spring-portlet-mvctiles-3

Tiles3 in spring portlet mvc


I've updated tiles version from 2.2.2 to 3.0.1 and i currently have a workaround to show portlet content based on solution described in http://forum.springsource.org/showthread.php?98961-Webflow-with-JSP-Tiles-Portlet-has-no-content/page2. Applying:

ServletUtil.setForceInclude(request, true);

resolved the JSP blank problem in this case. Is there any kind of similar solution for tiles3? In tiles3 i am facing the same situation and i can't find the ServletUtil class or any alternative to help me solve this problem.


Solution

  • With Tiles3, you can do request.setAttribute(AbstractRequest.FORCE_INCLUDE_ATTRIBUTE_NAME, true)

    A new TilesViewResolver#alwaysInclude property will be available in Spring Framework 4.1.2 to set this easily, more details available in the comment of this related JIRA issue at https://jira.spring.io/browse/SPR-12374.