[ https://issues.apache.org/jira/browse/TILES-594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16261763#comment-16261763 ]
Nicolas Le Bas commented on TILES-594: -------------------------------------- Most likely freemarker has not been enabled, or configured incorrectly. Please read the documentation: https://tiles.apache.org/2.2/framework/tutorial/configuration.html https://tiles.apache.org/2.2/framework/tutorial/configuration.html#Ready-made_configuration_classes > Struts 2 apache tiles freemarker template loading issue > ------------------------------------------------------- > > Key: TILES-594 > URL: https://issues.apache.org/jira/browse/TILES-594 > Project: Tiles > Issue Type: Bug > Components: tiles-freemarker > Affects Versions: 2.2.2 > Reporter: Jeevan Reddy Ragula > > We have a struts 2 tiles application and we are using freemarker for views. > We are migrating to struts 2.3.34 from 2.3.15. In the below tiles definition, > the template file is not getting loaded by freemarker and it is not being > parsed. Instead the content in depositLayout.ftl is rendered without being > parsed. > The options.ftl file is loaded by freemarker and rendered properly. > <!DOCTYPE tiles-definitions PUBLIC > "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" > "http://tiles.apache.org/dtds/tiles-config_2_1.dtd"> > <tiles-definitions> > <definition name="deposit" > template="/layouts/deposits/depositLayout.ftl"> > <put-attribute name="body" value="/deposits/options.ftl" /> > </definition> > </tiles-definitions> > We are using below version jars and loaded all the required jars. > struts2-core-2.3.34.jar > struts2-spring-plugin-2.3.34.jar > struts2-tiles-plugin-2.3.34.jar > tiles-api-2.2.2.jar > tiles-core-2.2.2.jar > tiles-jsp-2.2.2.jar > tiles-servlet-2.2.2.jar > xwork-core-2.3.34.jar > tiles-ognl-2.2.2.jar > freemarker-2.3.22.jar > tiles-freemarker-2.2.2.jar > tiles-el-2.2.2.jar > ognl-3.0.21.jar > tiles-template-2.2.2.jar > I have enabled the log trace for tiles and freemarker and below is the log. > Initializing Tiles2 container. . .<br/> > Tiles2 container initialization complete.<br/> > Publishing TilesContext for context: > org.apache.catalina.core.ApplicationContextFacade<br/> > Using object wrapper of class freemarker.template.DefaultObjectWrapper<br/> > Rendering freemarker tile ...<br/> > Adding support for Tiles tags, please remember to register {} in web.xml!<br/> > TemplateLoader.findTemplateSource("layouts/deposits/head.ftl"): Found<br/> > Can any one help me why the apache tiles is not able to load the template > specified as an attribute in defintion tag and not parsing it with > freemarker? The same ftl is rendered if i specify as an attribute to the > definition tag. If I specify a jsp file as a template, it is working fine. -- This message was sent by Atlassian JIRA (v6.4.14#64029)