Did you try asking this question on the FreeMarker mailing list?

-Adrian


--- On Fri, 12/5/08, madppiper <[EMAIL PROTECTED]> wrote:

> From: madppiper <[EMAIL PROTECTED]>
> Subject: Freemarker JspTaglibs error
> To: [email protected]
> Date: Friday, December 5, 2008, 2:06 AM
> Hey,
> 
> when trying to use an external taglib (jakarta image
> taglib) in ofbiz, i
> receive the following error:
> 
> ---- exception report
> ----------------------------------------------------------
> Error rendering included template at location
> [component://brandsparadise/webapp/brandsparadise/includes/catalog/productsamples.ftl]:
> freemarker.template.TemplateModelException: Could not find
> an instance of
> freemarker.ext.servlet.ServletContextHashModel in the data
> model under
> either the name __FreeMarkerServlet.Application__ or
> Application
> Exception: freemarker.template.TemplateModelException
> Message: Could not find an instance of
> freemarker.ext.servlet.ServletContextHashModel in the data
> model under
> either the name __FreeMarkerServlet.Application__ or
> Application
> ---- stack trace
> ---------------------------------------------------------------
> 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 img.image [on line 74, column 1 in
> component://brandsparadise/webapp/brandsparadise/includes/catalog/productsamples.ftl]
> ----------
> Java backtrace for programmers:
> ----------
> freemarker.template.TemplateModelException: Could not find
> an instance of
> freemarker.ext.servlet.ServletContextHashModel in the data
> model under
> either the name __FreeMarkerServlet.Application__ or
> Application
> freemarker.ext.jsp.FreeMarkerPageContext.<init>(FreeMarkerPageContext.java:124)
> freemarker.ext.jsp.FreeMarkerPageContext2.<init>(FreeMarkerPageContext2.java:21)
> freemarker.ext.jsp.FreeMarkerPageContext2.create(FreeMarkerPageContext2.java:25)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 
> 
> 
> 
> 
> 
> I added the Taglib to my freemarker file: 
> 
> <#assign
> img=JspTaglibs["/WEB-INF/taglibs-image.tld"]>
> 
> and also put all dependencies in place. I am accessing the
> taglib as such
> (this should be fine): 
> 
> <@img.image
> src="/images/bpimg/price_placeholder.gif"
>                name="price.png"
>                refresh="true"
>                 quality="1.0"
> display="false">
>                     
> </@img.image>
> 
> 
> 
> I think the dependencies get loaded just fine, so perhaps
> there is something
> else I am missing? I am using Revision 711975 btw
> -- 
> View this message in context:
> http://www.nabble.com/Freemarker-JspTaglibs-error-tp20850917p20850917.html
> Sent from the OFBiz - User mailing list archive at
> Nabble.com.


      

Reply via email to