Hi there,
I've been trying to get freemarker to be able to perform a include in the same way as a
jsp page does. As of Freemarker 2.3.15 this possible according to the manual (extract below)
Including content from other web application resources
You can use the <@include_page path="..."/> custom directive provided by the FreemarkerServlet (since 2.3.15) to include the contents of another web application resource into the output; this is often useful to integrate output of JSP pages (living alongside the FreeMarker templates in the same web server) into the FreeMarker template output. Using:
<@include_page path="path/to/some.jsp"/>
is identical to using this tag in JSP:
<jsp:include page="path/to/some.jsp">
I noticed that jforum uses the 2.3.9 jar file so I have replace this with the 2.3.15 but if I try to use this directive I get a message telling me the directive can not be found:
on line 8, column 1 in default/header.htm include_page not found. The problematic instruction:
There is a note in the documentation that if the Application does not use freemarker.ext.servlet.FreemarkerServlet then this functionality is not available. My question is how do I get Jforum to use this? I have the src code from cvs in eclipse and I've tried a few things in the JForumBaseServlet but I can't seem to figure out how to get JForum to use this.
Any advice would be greatly appreciated!
Best regards
David
[originally posted on jforum.net by daverh]