Users - JSP TAG LIBs

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

Users - JSP TAG LIBs

mukul joshi

Hi David,

 

I am trying to use JSP tags in FTL.

 

I have tried the following in the configproductdetail.ftl:

 

<#assign ofbiz=JspTaglibs["/WEB-INF/ofbiz.tld"]>

<@ofbiz.url/>

 

And have included the ofbiz.tld in the WEB-INF.

 

I get the following error:

Could not find the Application data model.FreeMarker JSP taglib integration can not be used outside the FreemarkerServlet environment. The problematic instruction: ---------- ==> user-directive ofbiz.url [on line 149, column 1 in configproductdetail.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Could not find the Application data model.FreeMarker JSP taglib integration can not be used outside the FreemarkerServlet environment. at freemarker.ext.jsp.FreeMarkerPageContext.(FreeMarkerPageContext.java:126) at freemarker.ext.jsp.FreeMarkerPageContext.getCurrentPageContext(FreeMarkerPageContext.java:109) at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:133) at freemarker.core.Environment.visit(Environment.java:220) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:231) at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplateAtLocation(FreeMarkerWorker.java:176) at

 

I have read the previous mails on this, but there is only the suggestion to play with the FreeMarkerViewHandler.java. Is this the only way forward?

 

Thanks & Regards,

Mukul

============================================================================================================================

Tech Mahindra, formerly Mahindra-British Telecom.


Disclaimer:


The contents of this E-mail (including the contents of the enclosure(s) or attachment(s) if any) are privileged and confidential material of Tech Mahindra and should not be disclosed to, used by or copied in any manner by anyone other than the intended addressee(s). In case you are not the desired addressee, you should delete this message and/or re-direct it to the sender. The views expressed in this E-mail message (including the enclosure(s) or attachment(s) if any) are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Tech Mahindra.


This e-mail message including attachment/(s), if any, is believed to be free of any virus. However, it is the responsibility of the recipient to ensure that it is virus free and Tech Mahindra is not responsible for any loss or damage arising in any way from its use.

============================================================================================================================

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - JSP TAG LIBs

David E. Jones

Mukul,

No, we don't have an easy way to do this in FTL pages in OFBiz. You  
can certainly change that or classes to do anything with FreeMarker.  
In general we don't use JSP tags in OFBiz FTL pages by default/
convention, so while it is certainly possible, we haven't made any  
effort to make it "easy" like we have with other things.

-David


On Mar 7, 2006, at 4:03 PM, mukul joshi wrote:

> Hi David,
>
>
> I am trying to use JSP tags in FTL.
>
>
> I have tried the following in the configproductdetail.ftl:
>
>
> <#assign ofbiz=JspTaglibs["/WEB-INF/ofbiz.tld"]>
>
> <@ofbiz.url/>
>
>
> And have included the ofbiz.tld in the WEB-INF.
>
>
> I get the following error:
>
> Could not find the Application data model.FreeMarker JSP taglib  
> integration can not be used outside the FreemarkerServlet  
> environment. The problematic instruction: ---------- ==> user-
> directive ofbiz.url [on line 149, column 1 in  
> configproductdetail.ftl] ---------- Java backtrace for programmers:  
> ---------- freemarker.template.TemplateModelException: Could not  
> find the Application data model.FreeMarker JSP taglib integration  
> can not be used outside the FreemarkerServlet environment. at  
> freemarker.ext.jsp.FreeMarkerPageContext.
> (FreeMarkerPageContext.java:126) at  
> freemarker.ext.jsp.FreeMarkerPageContext.getCurrentPageContext
> (FreeMarkerPageContext.java:109) at  
> freemarker.ext.jsp.TagTransformModel.getWriter
> (TagTransformModel.java:133) at freemarker.core.Environment.visit
> (Environment.java:220) at freemarker.core.UnifiedCall.accept
> (UnifiedCall.java:116) at freemarker.core.Environment.visit
> (Environment.java:196) at freemarker.core.MixedContent.accept
> (MixedContent.java:92) at freemarker.core.Environment.visit
> (Environment.java:196) at freemarker.core.Environment.process
> (Environment.java:176) at freemarker.template.Template.process
> (Template.java:231) at  
> org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplateAtLocation
> (FreeMarkerWorker.java:176) at
>
>
> I have read the previous mails on this, but there is only the  
> suggestion to play with the FreeMarkerViewHandler.java. Is this the  
> only way forward?
>
>
> Thanks & Regards,
>
> Mukul
>
> ======================================================================
> ======================================================
>
> Tech Mahindra, formerly Mahindra-British Telecom.
>
>
> Disclaimer:
>
>
> The contents of this E-mail (including the contents of the enclosure
> (s) or attachment(s) if any) are privileged and confidential  
> material of Tech Mahindra and should not be disclosed to, used by  
> or copied in any manner by anyone other than the intended addressee
> (s). In case you are not the desired addressee, you should delete  
> this message and/or re-direct it to the sender. The views expressed  
> in this E-mail message (including the enclosure(s) or attachment(s)  
> if any) are those of the individual sender, except where the sender  
> expressly, and with authority, states them to be the views of Tech  
> Mahindra.
>
>
> This e-mail message including attachment/(s), if any, is believed  
> to be free of any virus. However, it is the responsibility of the  
> recipient to ensure that it is virus free and Tech Mahindra is not  
> responsible for any loss or damage arising in any way from its use.
>
> ======================================================================
> ======================================================
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Users - JSP TAG LIBs

frabjousB
I'd be very interested in knowing how I can use a jsp taglib in an ftl page. Basically, I want to use packtag to compress, minify and combine javascript and css resources.

What is the solution to get taglibs working within ftl pages?

Thanks so much.