How To Use JSP Custom Tag Within Freemarker Template Page?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How To Use JSP Custom Tag Within Freemarker Template Page?

BrettS
Hi,

I am attempting to use a custom JSP tag within a Freemarker template within OFBiz without success.

In a JSP, the tag syntax is as follows:
     <%@ taglib uri="/WEB-INF/imps.tld" prefix="imps"%>
     <imps:xhtmldoctype request="<%=request%>"/>


So, I attempted the following in Freemarker:
     <#assign imps=JspTaglibs["/WEB-INF/imps.tld"]>
     <@imps.xhtmldoctype request=request />


However, the second line throws this error:
%{#request} Could not find an instance of freemarker.ext.servlet.ServletContextHashModel in the data model under either the name __FreeMarkerServlet.Application__ or Application
The problematic instruction: ---------- ==> user-directive imps.xhtmldoctype [on line 5, column 1 in mobile.ftl]

I do not know if my tag syntax is incorrect or, There is something I need to configure elsewhere or, if Freemarker within OFBiz supports custom JSP tags.

I did find this in controller.xml
<handler name="ftl" type="view" class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/> 
I'm a total newie to OFBiz and Freemarker, but I'm guessing this is not the same handler as standalone Freemarker.

Thank you.

Regards Brett S