You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by madppiper <pa...@mutschler.ch> on 2008/12/05 11:06:28 UTC

Freemarker JspTaglibs error

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.


Re: Freemarker JspTaglibs error

Posted by BJ Freeman <bj...@free-man.net>.
your are attempting things beyond ofbiz design.
so you on your own.

madppiper sent the following on 12/5/2008 2:26 AM:
> hmm... so is there any possible way to include jsptaglibs? or would I need to
> access the taglibs using bash files?

Re: Freemarker JspTaglibs error

Posted by madppiper <pa...@mutschler.ch>.
hmm... so is there any possible way to include jsptaglibs? or would I need to
access the taglibs using bash files?
-- 
View this message in context: http://www.nabble.com/Freemarker-JspTaglibs-error-tp20850917p20851219.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Freemarker JspTaglibs error

Posted by BJ Freeman <bj...@free-man.net>.
the Regions, Taglib, and Jsp have been deprecated some time ago.
Freemaker FtL extention is the only ones recognized.


madppiper sent the following on 12/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

Re: Freemarker JspTaglibs error

Posted by Adrian Crum <ad...@yahoo.com>.
Did you try asking this question on the FreeMarker mailing list?

-Adrian


--- On Fri, 12/5/08, madppiper <pa...@mutschler.ch> wrote:

> From: madppiper <pa...@mutschler.ch>
> Subject: Freemarker JspTaglibs error
> To: user@ofbiz.apache.org
> 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.