<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.web.freemarker.user">
    <title>gmane.comp.web.freemarker.user</title>
    <link>http://blog.gmane.org/gmane.comp.web.freemarker.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5419"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5411"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5409"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5404"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5401"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5396"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5373"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5371"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5367"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5366"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5364"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5362"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5357"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5354"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5351"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5347"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5344"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5342"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5341"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.freemarker.user/5334"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5419">
    <title>Suggestion about the best BeansWrapper</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5419</link>
    <description>&lt;pre&gt;Hi all,

recently Daniel Dekany helped me in this list to fix a deadlock condition happening under special conditions when OFBiz (http://ofbiz.apache.org) screens were rendering Freemarker templates; during that interesting thread Daniel also mentioned that the way about the way we use BeansWrapper in OFBiz; here is the relevant part of the conversation:

=====================================================
QUESTION (me): Currently in OFBiz we are using the default object wrapper:

BeansWrapper defaultOfbizWrapper = BeansWrapper.getDefaultInstance();

do you think we should use a different one?

ANSWER (Daniel): I'm not sure. There are two problems with the current one:

- If you look at what map keys FreeMarker sees (`&amp;lt;#list k as
 someMap?keys&amp;gt;${k} &amp;lt;/#list&amp;gt;`), it mixes the actual Map keys with the
 methods of the Map class. This I already find annoying enough to
 stay away. But it's also dangerous, because if you are unlucky and
 have key like "get", then someMap.get and someMap[myDynamicKey]
 where myDynamicKey happens to be "get" will return the get method
 instead of the map item. You can think further what if you have
 a custom Map class and you add methods to it. Using
 someMap.get("theKey") is robust however, but too verbose.

- It doesn't wrap W3C DOM nodes automatically in a way so that the
 user can use FreeMarker's XML processing facility. It also doesn't
 wrap Jython or Rhino JavaScript objects nicely.

What I like to use is:

  BeansWrapper wrapper = new BeansWrapper();
  wrapper.setSimpleMapWrapper(true);

This will not expose the methods of Map-s, only the keys of it. If you
want to get a map item that has a non-string key, you don't have
someMap.get(key) anymore, but you can use someMap(key) instead. If
it's a custom Map class with custom methods that you want to call from
the template, then you are out of luck, however. And in your case
these changes wouldn't be backward-compatible.

As of supporting W3C DOM nodes, Jython and such, it's very easy to
create a custom ObjectWrapper that does that. Just look at
DefaultObjectWrapper.

As of DefaultObjectWrapper, it's burdened with backward-compatibly,
and so wraps collections on an technically awkward way, plus it
doesn't provide any hacks for the non-String key problem. I don't see
a point of using that.

Anyway, the situation with Map-s and the "advertised" object wrappers
is something that had to be hammered out for ages. Sadly nobody has
found the time/incentive for it so far...
=====================================================

Based on Daniel's suggestions I have tried to replace:

BeansWrapper defaultOfbizWrapper = BeansWrapper.getDefaultInstance();

with

BeansWrapper defaultOfbizWrapper = new BeansWrapper();
defaultOfbizWrapper.setSimpleMapWrapper(true);

Unfortunately this change causes some errors in several screens because of ftl code snippets like:

1) ${currency.get("description",locale)}
2) &amp;lt;#assign roleType = quoteRole.getRelatedOne("RoleType")&amp;gt;

In the above examples "currency" and "quoteRole" are instances of GenericValue; this is a custom OFBiz class that implements Map&amp;lt;String, Object&amp;gt;

In order to fix these issues I have removed the method call:
defaultOfbizWrapper.setSimpleMapWrapper(true);

In this way the screens seem to work fine.

However I am not sure if there are side effects or if there are real advantages in using:
new BeansWrapper();

rather than:

BeansWrapper.getDefaultInstance();

Could you please provide some hints?

Thank you

Jacopo


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Jacopo Cappellato</dc:creator>
    <dc:date>2012-05-14T16:19:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5411">
    <title>how to pass value from code to page template</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5411</link>
    <description>&lt;pre&gt;I have a page template that I use for all my pages like:

&amp;lt;#macro page title="soem title"&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;title&amp;gt;${title}&amp;lt;/title&amp;gt;
&amp;lt;/html&amp;gt;
&amp;lt;body&amp;gt;
..
&amp;lt;#nested&amp;gt;

&amp;lt;/body&amp;gt;

&amp;lt;/#macro&amp;gt;

Then in my page I am doing:

&amp;lt;#import "/page.ftl" as p&amp;gt;

&amp;lt;&amp;lt; at &amp;gt;p.page title="some title"&amp;gt;

...


What if I wanted to get the title from my java code, and pass it down, is
that possible?

I'm using spring, and my view gets the ModelAndView values, can I set it
from the server side and pass it as a parameter for title?
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>S Ahmed</dc:creator>
    <dc:date>2012-05-10T04:20:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5409">
    <title>Scheduled downtime of freemarker.org</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5409</link>
    <description>&lt;pre&gt;The server which hosts freemarker.org will be down for several hours due 
to maintenance work at the data center, approximately from

   Wed, 25 Apr 2012 20:15:00 GMT

to

   Thu, 26 Apr 2012 03:00:00 GMT


Hopefully the server will be back online a little bit sooner.



Stephan.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Stephan Müller</dc:creator>
    <dc:date>2012-04-25T07:03:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5404">
    <title>confused about html escaping</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5404</link>
    <description>&lt;pre&gt;My page is wrapped in a module that does has html escaping:

&amp;lt;#escape x as x?html&amp;gt;
..

&amp;lt;#nested&amp;gt;
..

&amp;lt;/#escape&amp;gt;

Then my nested section is outputing the values of a collection like this:

&amp;lt;pre&amp;gt;
                    &amp;lt;#list someCollection as doc&amp;gt;
                        &amp;lt;div class="line"&amp;gt;${doc.line}&amp;lt;/div&amp;gt;
                    &amp;lt;/#list&amp;gt;
&amp;lt;/pre&amp;gt;

Now the value of line is like "&amp;lt; some text here&amp;gt;"

But on my page, it is showing up as blank.  Looking at the actual rendered
html it shows blank also.  When I set a breakpoint in my code, I can see
that the collection has the value "&amp;lt; some text here &amp;gt;" for the item in the
collection 'someCollection'.

I tried removing the &amp;lt;#escape x as x?html&amp;gt; also and nothing changed, still
don't see the row.

I just want to safely display this information like this in the html:  &amp;amp;lt;
some text here &amp;amp;gt;
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>S Ahmed</dc:creator>
    <dc:date>2012-04-23T14:14:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5401">
    <title>loop a treemap</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5401</link>
    <description>&lt;pre&gt;How can I display both key and value paris inside of a treemap?

Do I still use the #list macro?
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>S Ahmed</dc:creator>
    <dc:date>2012-04-22T20:34:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5396">
    <title>FreeMarker and PostScript?</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5396</link>
    <description>&lt;pre&gt;Hi All,

I'm considering using freemarker in an upcoming project.  One question I
had, does FreeMarker support post script? Are there any tutorials for
generating post script using freemarker?

John
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>John D. Ament</dc:creator>
    <dc:date>2012-04-21T17:35:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5373">
    <title>Deadlock issue</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5373</link>
    <description>&lt;pre&gt;Hi all,

I know the question could be silly but we are struggling with a deadlock issue and I am wondering if any of you could give some hints to locate the problem.
We are using Freemarker (2.3.10) in a server with high traffic and we are experiencing a deadlock that makes the server very unstable.
Here are the details of the deadlock:

Thread 1:
a) ClassBasedModelFactory.get is called: this method acquires a lock on the "cache" variable
b) the method then calls BeansWrapper.introspectClass: this method attempts to acquire a lock on "classCache" variable

Thread 2:
x) BeansWrapper.introspectClass is called: this method acquires a lock on the "classCache" variable
y) the method then calls BeansWrapper.introspectClass that in turn calls ClassBasedModelFactory.clearCache: this method attempts to acquire a lock on "cache" variable

If the two threads are concurrent and perform the tasks in the following order:
a
x
b
y
we get the deadlock.

Now: we are sure this is the cause of the problem; what we do not know, and I am hoping on your help, is what could be cause that 2 threads perform the calls axby on the two objects ClassBasedModelFactory and BeansWrapper
I suspect it may be something wrong we are doing with Freemarker templates, include directives etc...

Thanks,

Jacopo

===============
For reference, here are the details about the two threads:

&amp;lt; at &amp;gt;400000004f8e564b269dcbac "Thread 1":
&amp;lt; at &amp;gt;400000004f8e564b269dcf94 at freemarker.ext.beans.BeansWrapper.introspectClass(BeansWrapper.java:924)
&amp;lt; at &amp;gt;400000004f8e564b269dcf94 - waiting to lock &amp;lt;0x0000000785e62868&amp;gt; (a java.util.HashMap)
&amp;lt; at &amp;gt;400000004f8e564b269dd764 at freemarker.ext.beans.BeanModel.&amp;lt;init&amp;gt;(BeanModel.java:139)
&amp;lt; at &amp;gt;400000004f8e564b269ddb4c at freemarker.ext.beans.StringModel.&amp;lt;init&amp;gt;(StringModel.java:90)
&amp;lt; at &amp;gt;400000004f8e564b269ddb4c at org.ofbiz.widget.screen.HtmlWidget$StringHtmlWrapperForFtl.&amp;lt;init&amp;gt;(HtmlWidget.java:87)
&amp;lt; at &amp;gt;400000004f8e564b269ddf34 at org.ofbiz.widget.screen.HtmlWidget$ExtendedWrapper.wrap(HtmlWidget.java:76)
&amp;lt; at &amp;gt;400000004f8e564b269df2bc at freemarker.ext.beans.StaticModel.populate(StaticModel.java:170)
&amp;lt; at &amp;gt;400000004f8e564b269df6a4 at freemarker.ext.beans.StaticModel.&amp;lt;init&amp;gt;(StaticModel.java:89)
&amp;lt; at &amp;gt;400000004f8e564b269df6a4 at freemarker.ext.beans.StaticModels.createModel(StaticModels.java:75)
&amp;lt; at &amp;gt;400000004f8e564b269dfa8c at freemarker.ext.beans.ClassBasedModelFactory.get(ClassBasedModelFactory.java:82)
&amp;lt; at &amp;gt;400000004f8e564b269dfa8c - locked &amp;lt;0x0000000785f573a8&amp;gt; (a java.util.HashMap)
&amp;lt; at &amp;gt;400000004f8e564b269e025c at freemarker.core.DynamicKeyName.dealWithStringKey(DynamicKeyName.java:136)
&amp;lt; at &amp;gt;400000004f8e564b269e0644 at freemarker.core.DynamicKeyName._getAsTemplateModel(DynamicKeyName.java:94)
&amp;lt; at &amp;gt;400000004f8e564b269e0a2c at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b269e3524 at freemarker.core.Dot._getAsTemplateModel(Dot.java:74)
&amp;lt; at &amp;gt;400000004f8e564b269e390c at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b269e390c at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86)
&amp;lt; at &amp;gt;400000004f8e564b269e3cf4 at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b269e40dc at freemarker.core.BuiltIn$if_existsBI._getAsTemplateModel(BuiltIn.java:677)
&amp;lt; at &amp;gt;400000004f8e564b269e507c at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b269e507c at freemarker.core.Assignment.accept(Assignment.java:90)
&amp;lt; at &amp;gt;400000004f8e564b269e601c at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b269e6fbc at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b269ea284 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b269eb60c at freemarker.core.IfBlock.accept(IfBlock.java:82)
&amp;lt; at &amp;gt;400000004f8e564b269eb60c at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b269ec5ac at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b269ed934 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b269ee8d4 at freemarker.core.IfBlock.accept(IfBlock.java:82)
&amp;lt; at &amp;gt;400000004f8e564b269ef48c at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b269f042c at freemarker.core.Environment.process(Environment.java:176)
&amp;lt; at &amp;gt;400000004f8e564b269f17b4 at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:258)
&amp;lt; at &amp;gt;400000004f8e564b269f2754 at org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:225)
&amp;lt; at &amp;gt;400000004f8e564b269f36f4 at org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:270)
&amp;lt; at &amp;gt;400000004f8e564b269f4694 at org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:130)
&amp;lt; at &amp;gt;400000004f8e564b269f5a1c at org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:915)
&amp;lt; at &amp;gt;400000004f8e564b269f69bc at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104)
&amp;lt; at &amp;gt;400000004f8e564b269f795c at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191)
&amp;lt; at &amp;gt;400000004f8e564b269f88fc at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396)
&amp;lt; at &amp;gt;400000004f8e564b269f989c at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135)
&amp;lt; at &amp;gt;400000004f8e564b269fac24 at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97)
&amp;lt; at &amp;gt;400000004f8e564b269fbbc4 at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
&amp;lt; at &amp;gt;400000004f8e564b26a02d0c at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&amp;lt; at &amp;gt;400000004f8e564b26a030f4 at java.lang.reflect.Method.invoke(Method.java:597)
&amp;lt; at &amp;gt;400000004f8e564b26a04864 at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:825)
&amp;lt; at &amp;gt;400000004f8e564b26a05bec at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:111)
&amp;lt; at &amp;gt;400000004f8e564b26a06b8c at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
&amp;lt; at &amp;gt;400000004f8e564b26a07b2c at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b26a08acc at freemarker.core.Expression.getStringValue(Expression.java:93)
&amp;lt; at &amp;gt;400000004f8e564b26a09a6c at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
&amp;lt; at &amp;gt;400000004f8e564b26a0aa0c at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26a0b9ac at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b26a0c94c at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26a0d8ec at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:172)
&amp;lt; at &amp;gt;400000004f8e564b26a0ec74 at freemarker.core.Environment.visit(Environment.java:351)
&amp;lt; at &amp;gt;400000004f8e564b26a1176c at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
&amp;lt; at &amp;gt;400000004f8e564b26a1176c at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26a12af4 at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b26a12af4 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26a13a94 at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:172)
&amp;lt; at &amp;gt;400000004f8e564b26a14a34 at freemarker.core.Environment.visit(Environment.java:351)
&amp;lt; at &amp;gt;400000004f8e564b26a159d4 at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
&amp;lt; at &amp;gt;400000004f8e564b26a16974 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26a17914 at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b26a188b4 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26a1bb7c at freemarker.core.IfBlock.accept(IfBlock.java:82)
&amp;lt; at &amp;gt;400000004f8e564b26a1bf64 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26a1bf64 at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b26a1cf04 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26a1d2ec at freemarker.core.Environment.process(Environment.java:176)

&amp;lt; at &amp;gt;400000004f8e564b2690759c "Thread 2":
&amp;lt; at &amp;gt;400000004f8e564b26907d6c at freemarker.ext.beans.ClassBasedModelFactory.clearCache(ClassBasedModelFactory.java:98)
&amp;lt; at &amp;gt;400000004f8e564b26908154 - waiting to lock &amp;lt;0x0000000785f573a8&amp;gt; (a java.util.HashMap)
&amp;lt; at &amp;gt;400000004f8e564b2690853c at freemarker.ext.beans.BeansWrapper.introspectClassInternal(BeansWrapper.java:950)
&amp;lt; at &amp;gt;400000004f8e564b26908924 at freemarker.ext.beans.BeansWrapper.introspectClass(BeansWrapper.java:928)
&amp;lt; at &amp;gt;400000004f8e564b26908924 - locked &amp;lt;0x0000000785e62868&amp;gt; (a java.util.HashMap)
&amp;lt; at &amp;gt;400000004f8e564b2690bfd4 at freemarker.ext.beans.BeanModel.&amp;lt;init&amp;gt;(BeanModel.java:139)
&amp;lt; at &amp;gt;400000004f8e564b2690c3bc at freemarker.ext.beans.StringModel.&amp;lt;init&amp;gt;(StringModel.java:90)
&amp;lt; at &amp;gt;400000004f8e564b2690c7a4 at freemarker.ext.beans.StringModel$1.create(StringModel.java:75)
&amp;lt; at &amp;gt;400000004f8e564b2690cb8c at freemarker.ext.util.ModelCache.getInstance(ModelCache.java:113)
&amp;lt; at &amp;gt;400000004f8e564b2690cb8c at freemarker.ext.beans.BeansWrapper.wrap(BeansWrapper.java:459)
&amp;lt; at &amp;gt;400000004f8e564b2690db2c at org.ofbiz.widget.screen.HtmlWidget$ExtendedWrapper.wrap(HtmlWidget.java:81)
&amp;lt; at &amp;gt;400000004f8e564b2690fa6c at freemarker.ext.beans.BeanModel.wrap(BeanModel.java:319)
&amp;lt; at &amp;gt;400000004f8e564b2690fa6c at freemarker.ext.beans.MapModel.invokeGenericGet(MapModel.java:134)
&amp;lt; at &amp;gt;400000004f8e564b2690fe54 at freemarker.ext.beans.BeanModel.get(BeanModel.java:185)
&amp;lt; at &amp;gt;400000004f8e564b2691023c at freemarker.core.Environment.getGlobalVariable(Environment.java:979)
&amp;lt; at &amp;gt;400000004f8e564b2691023c at freemarker.core.Environment.getVariable(Environment.java:965)
&amp;lt; at &amp;gt;400000004f8e564b269111dc at freemarker.core.Identifier._getAsTemplateModel(Identifier.java:70)
&amp;lt; at &amp;gt;400000004f8e564b269115c4 at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b269115c4 at freemarker.core.Dot._getAsTemplateModel(Dot.java:74)
&amp;lt; at &amp;gt;400000004f8e564b269119ac at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b26911d94 at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86)
&amp;lt; at &amp;gt;400000004f8e564b2691294c at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b2691294c at freemarker.core.Assignment.accept(Assignment.java:90)
&amp;lt; at &amp;gt;400000004f8e564b26912d34 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26912d34 at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b269144a4 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b2691488c at freemarker.core.IfBlock.accept(IfBlock.java:82)
&amp;lt; at &amp;gt;400000004f8e564b26914c74 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26914c74 at freemarker.core.Environment.process(Environment.java:176)
&amp;lt; at &amp;gt;400000004f8e564b2691505c at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:258)
&amp;lt; at &amp;gt;400000004f8e564b26916bb4 at org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:225)
&amp;lt; at &amp;gt;400000004f8e564b26916f9c at org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:270)
&amp;lt; at &amp;gt;400000004f8e564b26918af4 at org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:130)
&amp;lt; at &amp;gt;400000004f8e564b26918af4 at org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:915)
&amp;lt; at &amp;gt;400000004f8e564b26919e7c at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104)
&amp;lt; at &amp;gt;400000004f8e564b2691ae1c at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191)
&amp;lt; at &amp;gt;400000004f8e564b2691bdbc at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396)
&amp;lt; at &amp;gt;400000004f8e564b2691d144 at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135)
&amp;lt; at &amp;gt;400000004f8e564b2691e0e4 at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97)
&amp;lt; at &amp;gt;400000004f8e564b2691f084 at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
&amp;lt; at &amp;gt;400000004f8e564b26920024 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&amp;lt; at &amp;gt;400000004f8e564b26920fc4 at java.lang.reflect.Method.invoke(Method.java:597)
&amp;lt; at &amp;gt;400000004f8e564b26921f64 at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:825)
&amp;lt; at &amp;gt;400000004f8e564b26922f04 at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:111)
&amp;lt; at &amp;gt;400000004f8e564b26926d84 at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
&amp;lt; at &amp;gt;400000004f8e564b2692716c at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b2692ac04 at freemarker.core.Expression.getStringValue(Expression.java:93)
&amp;lt; at &amp;gt;400000004f8e564b2692afec at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
&amp;lt; at &amp;gt;400000004f8e564b2692afec at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b2692b3d4 at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b2692c374 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b2692d314 at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160)
&amp;lt; at &amp;gt;400000004f8e564b2692e2b4 at freemarker.core.Environment.visit(Environment.java:351)
&amp;lt; at &amp;gt;400000004f8e564b2692f254 at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
&amp;lt; at &amp;gt;400000004f8e564b26944a14 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26944dfc at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b26944dfc at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b269451e4 at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
&amp;lt; at &amp;gt;400000004f8e564b269451e4 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b269455cc at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b26946d3c at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26947124 at freemarker.core.Environment.process(Environment.java:176)
&amp;lt; at &amp;gt;400000004f8e564b26947124 at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:258)
&amp;lt; at &amp;gt;400000004f8e564b2694750c at org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:225)
&amp;lt; at &amp;gt;400000004f8e564b269478f4 at org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:270)
&amp;lt; at &amp;gt;400000004f8e564b26948894 at org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:130)
&amp;lt; at &amp;gt;400000004f8e564b26948894 at org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:915)
&amp;lt; at &amp;gt;400000004f8e564b26948c7c at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104)
&amp;lt; at &amp;gt;400000004f8e564b2694a3ec at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191)
&amp;lt; at &amp;gt;400000004f8e564b2694a3ec at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396)
&amp;lt; at &amp;gt;400000004f8e564b2694a7d4 at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135)
&amp;lt; at &amp;gt;400000004f8e564b2694a7d4 at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97)
&amp;lt; at &amp;gt;400000004f8e564b2694b38c at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
&amp;lt; at &amp;gt;400000004f8e564b2694b38c at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&amp;lt; at &amp;gt;400000004f8e564b2694b774 at java.lang.reflect.Method.invoke(Method.java:597)
&amp;lt; at &amp;gt;400000004f8e564b2694c714 at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:825)
&amp;lt; at &amp;gt;400000004f8e564b2694cafc at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:111)
&amp;lt; at &amp;gt;400000004f8e564b2694da9c at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
&amp;lt; at &amp;gt;400000004f8e564b2694da9c at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
&amp;lt; at &amp;gt;400000004f8e564b2694ea3c at freemarker.core.Expression.getStringValue(Expression.java:93)
&amp;lt; at &amp;gt;400000004f8e564b2694fdc4 at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
&amp;lt; at &amp;gt;400000004f8e564b26950d64 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26951d04 at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b26952ca4 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26953c44 at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
&amp;lt; at &amp;gt;400000004f8e564b26954be4 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b26955b84 at freemarker.core.MixedContent.accept(MixedContent.java:92)
&amp;lt; at &amp;gt;400000004f8e564b26959234 at freemarker.core.Environment.visit(Environment.java:196)
&amp;lt; at &amp;gt;400000004f8e564b2695c8e4 at freemarker.core.Environment.process(Environment.java:176)


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
&lt;/pre&gt;</description>
    <dc:creator>Jacopo Cappellato</dc:creator>
    <dc:date>2012-04-18T15:06:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5371">
    <title>using includes inside a macro?</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5371</link>
    <description>&lt;pre&gt;Is it possible to have includes in a macro?

My macro has a varialbe isSignedIn which is defaulted to false.

I want to include 2 other templates, both are navigation html elements, 1
for logged in users and the other for not.

So depending on the isSignedIn flag, I want to display a specific include.
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>S Ahmed</dc:creator>
    <dc:date>2012-04-10T17:35:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5367">
    <title>help in understand how to reference my objects inmy view</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5367</link>
    <description>&lt;pre&gt;I have a UserSession object that I add into my model like:


UserSession userSession = get....

ModelAndView mav = new ModelAndView("..");


mav.add("session", userSession);

return mav;

Now in my index.ftl page I want to do this:

if userSession.isLoggedIn
&amp;lt;p&amp;gt;....
&amp;lt;/p&amp;gt;
end if

How do I do that using freemarker?

I tried this:

&amp;lt;#if session.isSignedIn&amp;gt;
&amp;lt;/#if&amp;gt;

But I get an error saying that session.isSignedIn has to return true/false.
 Is does return true/false, so what is wrong?

thanks!
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>S Ahmed</dc:creator>
    <dc:date>2012-04-09T20:10:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5366">
    <title>freemarker and spring</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5366</link>
    <description>&lt;pre&gt;When using freemarker and spring, I was looking at the source code of the
freemarker viewresolver etc. and I recall seeing a place where request
attribute level objects can merged into the ModelAndView that is sent to
the view.

Is this true?

So if I have:

request.setAttribute("someObject", someObject);

that I set using a filter for example, when my view is rendered does this
mean the someObject will be available in my freemarker view or is there is
a config setting I have to switch to allow for this to happen?
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>S Ahmed</dc:creator>
    <dc:date>2012-04-09T19:25:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5364">
    <title>Freemarker DTD Validation Issue - Urgent</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5364</link>
    <description>&lt;pre&gt;Hi,

We use Freemarker on our site to generate dynamic sections of the pages. Recently, we have been noticing DTD validation errors and the issue seems to be with connecting to java.sun.com and it is intermittent. 

Is there anyway to turn off DTD validation (We understand its not a best practice) or any alternative to resolve this issue? This is Urgent.

Thanks
Ram Palagummi
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>Ram Palagummi</dc:creator>
    <dc:date>2012-04-04T14:50:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5362">
    <title>reqest a getExpression() method forfreemarker.core.InvalidReferenceException</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5362</link>
    <description>&lt;pre&gt;For exception handling, I would like to capture the actual expression that 
failed.  It appears the only way to get the expression is to parse the Strings 
returned in the detailMessage and/or the ftlInstructionStack.




------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
&lt;/pre&gt;</description>
    <dc:creator>eric east</dc:creator>
    <dc:date>2012-04-03T17:59:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5357">
    <title>accessing JAXB generated properties of a bean (accessing static inner class)</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5357</link>
    <description>&lt;pre&gt;Hi all, I was turned onto freemarker today and really impressed with it, and wanted to use it to generate spreadsheetML
(xml that  Excel will open as if it were a xlsx file)

I am having problems accessing properties buried a few layers deep.

Basically, I have a   OrganisationInfo class which contains an OrganisationInfo. NetworkList object,
And that networkList property contains a List of Network objects, from which I need to get
property values.

I am wondering if JAXB has generated something freemarker can't be used to access in it's template.

I want to try something like

cfg.setObjectWrapper(  new DefaultObjectWrapper() );
SimpleHash root = new SimpleHash();
// expose JAXB generated java object
root.put("organisationInfo", organisationInfo);

then my template has accessing syntax like

&amp;lt;h1&amp;gt; ${organisationInfo.networkList[0].tadigCode} &amp;lt;/h1&amp;gt;

Is this possible with freemarker? Is there an example of this anywhere?
I get various errors Expected hash. organisationInfo.networkList[0] evaluated instead to freemarker.template.SimpleScalar.

Thanks all




I have JAXB generated classes like this

OrganisationInfo.java
=====================
&amp;lt; at &amp;gt;XmlRootElement(name = "OrganisationInfo")
public class OrganisationInfo
{
&amp;lt; at &amp;gt;XmlElement(name = "NetworkList", required = true)
protected OrganisationInfo.NetworkList networkList;

.
.
.

&amp;lt; at &amp;gt;XmlAccessorType(XmlAccessType.FIELD)
&amp;lt; at &amp;gt;XmlType(name = "", propOrder = {"network"})
public static class NetworkList
{
              &amp;lt; at &amp;gt;XmlElement(name = "Network", required = true)
        protected List&amp;lt;Network&amp;gt; network;
.
.
}
}


Network.java
============
&amp;lt; at &amp;gt;XmlRootElement(name = "Network")
public class Network
{
    &amp;lt; at &amp;gt;XmlElement(name = "TADIGCode", required = true)
    protected String tadigCode;

      .
      .

}
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>Walker, Robert</dc:creator>
    <dc:date>2012-03-30T03:55:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5354">
    <title>simple layout not working</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5354</link>
    <description>&lt;pre&gt;I'm getting this error:

Error reading imported file WEB-INF/views/layout/master.ftl The problematic
instruction: ---------- ==&amp;gt; import "/WEB-INF/views/layout/master.ftl" as p
[on line 1, column 1 in home/index.ftl] ---------- Java backtrace for
programmers: ---------- freemarker.template.TemplateException: Error
reading imported file WEB-INF/views/layout/master.ftl at
freemarker.core.LibraryLoad.accept(LibraryLoad.java:122) at
freemarker.core.Environment.visit(Environment.java:221) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:221) at
freemarker.core.Environment.process(Environment.java:199) at
freemarker.template.Template.process(Template.java:259) at
org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366)
at
org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283)
at
org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233)
at
org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
at
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1157)
at

My 2 templates are in:

/web-inf/views/layout/master.ftl
/web-inf/views/home/index.ftl


index.ftl:

&amp;lt;#import "/WEB-INF/views/layout/master.ftl" as p&amp;gt;
&amp;lt;&amp;lt; at &amp;gt;p.page "abc"&amp;gt;
    nested goes here
&amp;lt;/&amp;lt; at &amp;gt;p.page&amp;gt;


master.ftl:

&amp;lt;#escape x as x?html&amp;gt;

    &amp;lt;#macro page title&amp;gt;
    &amp;lt;!DOCTYPE html&amp;gt;

    &amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;meta http-equiv="content-type" content="text/html;charset=utf-8"/&amp;gt;
        &amp;lt;title&amp;gt;${title}&amp;lt;/title&amp;gt;
 ...
..
 &amp;lt;#nested&amp;gt;
..
..

    &amp;lt;/body&amp;gt;
    &amp;lt;/html&amp;gt;
    &amp;lt;/#macro&amp;gt;
&amp;lt;/#escape&amp;gt;


Does anything seem wrong here?
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>S Ahmed</dc:creator>
    <dc:date>2012-03-28T02:43:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5351">
    <title>Difficulty with XPath and Namespaces usingEclipse with simple ANT build</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5351</link>
    <description>&lt;pre&gt;Hello

Put simply, I cannot get Freemarker to process XPath queries or recognise XML namespaces - even using the examples out of the documentation. I am sure this must mean I'm doing something silly, but I cannot work out what.

Specifically; my XML document looks like this:-

&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;book title="Test"&amp;gt;
  &amp;lt;chapter title="Ch1"&amp;gt;
    &amp;lt;para&amp;gt;p1.1&amp;lt;/para&amp;gt;
    &amp;lt;para&amp;gt;p1.2&amp;lt;/para&amp;gt;
    &amp;lt;para&amp;gt;p1.3&amp;lt;/para&amp;gt;
  &amp;lt;/chapter&amp;gt;
  &amp;lt;chapter title="Ch2"&amp;gt;
    &amp;lt;para&amp;gt;p2.1&amp;lt;/para&amp;gt;
    &amp;lt;para&amp;gt;p2.2&amp;lt;/para&amp;gt;
  &amp;lt;/chapter&amp;gt;
&amp;lt;/book&amp;gt; 

and my template like this

&amp;lt;#assign book=document.book&amp;gt;
&amp;lt;h1&amp;gt;${book.&amp;lt; at &amp;gt;title}&amp;lt;/h1&amp;gt;
&amp;lt;#list book.chapter as ch&amp;gt;
  &amp;lt;h2&amp;gt;${ch.&amp;lt; at &amp;gt;title}&amp;lt;/h2&amp;gt;
  &amp;lt;#list ch.para as p&amp;gt;
    &amp;lt;p&amp;gt;${p}
  &amp;lt;/#list&amp;gt;
&amp;lt;/#list&amp;gt;  
&amp;lt;---- Next list ---&amp;gt;
&amp;lt;#list document["book/chapter[title='Ch1']/para"] as p&amp;gt;
  &amp;lt;p&amp;gt;${p}
&amp;lt;/#list&amp;gt; 
&amp;lt;--- do the original again --&amp;gt;
&amp;lt;#list book.chapter as ch&amp;gt;
  &amp;lt;h2&amp;gt;${ch.&amp;lt; at &amp;gt;title}&amp;lt;/h2&amp;gt;
  &amp;lt;#list ch.para as p&amp;gt;
    &amp;lt;p&amp;gt;${p}
  &amp;lt;/#list&amp;gt;
&amp;lt;/#list&amp;gt;  
&amp;lt;---- Count --&amp;gt;
${document["count(//para)"]}  

and my output looks like

&amp;lt;h1&amp;gt; title="Test"&amp;lt;/h1&amp;gt;
  &amp;lt;h2&amp;gt; title="Ch1"&amp;lt;/h2&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p1.1&amp;lt;/para&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p1.2&amp;lt;/para&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p1.3&amp;lt;/para&amp;gt;
  &amp;lt;h2&amp;gt; title="Ch2"&amp;lt;/h2&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p2.1&amp;lt;/para&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p2.2&amp;lt;/para&amp;gt;
&amp;lt;---- Next list ---&amp;gt;
&amp;lt;--- do the original again --&amp;gt;
  &amp;lt;h2&amp;gt; title="Ch1"&amp;lt;/h2&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p1.1&amp;lt;/para&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p1.2&amp;lt;/para&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p1.3&amp;lt;/para&amp;gt;
  &amp;lt;h2&amp;gt; title="Ch2"&amp;lt;/h2&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p2.1&amp;lt;/para&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;para&amp;gt;p2.2&amp;lt;/para&amp;gt;
&amp;lt;---- Count --&amp;gt;
  

As you can see, the XPath just doesn't return anything (nor any error) and yet all this is a direct copy out of the documentation on-line.

It gets worse if I try and use namespaces.

Change the basic XML to look as below

&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;e:book xmlns:e="http://example.com/ebook" 
    title="Test"&amp;gt;
  &amp;lt;e:chapter title="Ch1"&amp;gt;
    &amp;lt;e:para&amp;gt;p1.1&amp;lt;/e:para&amp;gt;
    &amp;lt;e:para&amp;gt;p1.2&amp;lt;/e:para&amp;gt;
    &amp;lt;e:para&amp;gt;p1.3&amp;lt;/e:para&amp;gt;
  &amp;lt;/e:chapter&amp;gt;
  &amp;lt;e:chapter title="Ch2"&amp;gt;
    &amp;lt;e:para&amp;gt;p2.1&amp;lt;/e:para&amp;gt;
    &amp;lt;e:para&amp;gt;p2.2&amp;lt;/e:para&amp;gt;
  &amp;lt;/e:chapter&amp;gt;
&amp;lt;/e:book&amp;gt;  


Use the template that follows:

&amp;lt;#ftl ns_prefixes={"e":"http://example.com/ebook"}&amp;gt;

&amp;lt;#recurse&amp;gt;

&amp;lt;#macro "e:book"&amp;gt;
  I'm the book element handler. ${.node.&amp;lt; at &amp;gt;title}
&amp;lt;/#macro&amp;gt;  

and get this output (which is correct)

  I'm the book element handler. Test

BUT, use this template

&amp;lt;#ftl ns_prefixes={"e":"http://example.com/ebook"}&amp;gt;
&amp;lt;#assign book=document["e:book"]&amp;gt;
&amp;lt;h1&amp;gt;${book.&amp;lt; at &amp;gt;title}&amp;lt;/h1&amp;gt;
&amp;lt;#list book["e:chapter"] as ch&amp;gt;
  &amp;lt;h2&amp;gt;${ch.&amp;lt; at &amp;gt;title}&amp;lt;/h2&amp;gt;
  &amp;lt;#list ch["e:para"] as p&amp;gt;
    &amp;lt;p&amp;gt;${p}
  &amp;lt;/#list&amp;gt;
&amp;lt;/#list&amp;gt;  
&amp;lt;---- Next list ---&amp;gt;
&amp;lt;#list document["e:book/e:chapter[title='Ch1']/e:para"] as p&amp;gt;
  &amp;lt;p&amp;gt;${p}
&amp;lt;/#list&amp;gt; 
&amp;lt;--- do the original again --&amp;gt;
&amp;lt;#list book["e:chapter"] as ch&amp;gt;
  &amp;lt;h2&amp;gt;${ch.&amp;lt; at &amp;gt;title}&amp;lt;/h2&amp;gt;
  &amp;lt;#list ch["e:para"] as p&amp;gt;
    &amp;lt;p&amp;gt;${p}
  &amp;lt;/#list&amp;gt;
&amp;lt;/#list&amp;gt;  
&amp;lt;---- Count --&amp;gt;
${document["count(//e:para)"]}  

and you get a Java exception

[freemarker] Mar 26, 2012 4:15:35 PM freemarker.log.JDK14LoggerFactory$JDK14Logger error
[freemarker] SEVERE: Template processing error: "Namespace prefix e is not registered."
[freemarker] Namespace prefix e is not registered.
[freemarker] The problematic instruction:
[freemarker] ----------
[freemarker] ==&amp;gt; assignment: book=document["e:book"] [on line 2, column 1 in books.ftl]


even if the syntax were wrong in itself, the namespace has been registered. So it seem that ns_prefixes works if you use declaratives (recurse) but not if you use imperatives.

Can any kind person suggest what I am getting wrong??

Thanks in advance

Bob Johnson------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>Robert Johnson</dc:creator>
    <dc:date>2012-03-26T15:19:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5347">
    <title>Listing enumerations</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5347</link>
    <description>&lt;pre&gt;Hi,

I have a method which returns an Enumeration, but when it is rendered
with #list or #foreach
an exception is thrown:

?size is unsupported for: freemarker.ext.beans.OverloadedMethodModel
The problematic instruction:
----------
==&amp;gt; list melati.database.displayTables as table [on line 67, column 50
in org/melati/admin/Top.fml]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: ?size is unsupported for:
freemarker.ext.beans.OverloadedMethodModel
at freemarker.ext.beans.OverloadedMethodModel.size(OverloadedMethodModel.java:149)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:174)
at freemarker.core.Environment.visit(Environment.java:428)

The template is:

&amp;lt;select name="table" OnChange="submit();" title="Select table to edit"&amp;gt;
&amp;lt;#assign lasttype = ""&amp;gt;
&amp;lt;#assign selected = false&amp;gt;
&amp;lt;#list melati.database.displayTables as table&amp;gt;
  &amp;lt;#if !table.tableInfo.category.equals(lasttype)&amp;gt;
    &amp;lt;option value=""&amp;gt;&amp;amp;nbsp;&amp;lt;/option&amp;gt;
    &amp;lt;option value=""&amp;gt;${table.tableInfo.category.name}&amp;lt;/option&amp;gt;
    &amp;lt;option value=""&amp;gt;============&amp;lt;/option&amp;gt;
  &amp;lt;/#if&amp;gt;
  &amp;lt;#assign lasttype = table.tableInfo.category&amp;gt;
  &amp;lt;option value="${table.name}"
  &amp;lt;#if !selected&amp;gt;
   &amp;lt;#if melati.table&amp;gt;
    &amp;lt;#if melati.table.equals(table)&amp;gt;
    selected="selected"
     &amp;lt;#assign selected = true&amp;gt;
   &amp;lt;/#if&amp;gt;
   &amp;lt;#else&amp;gt;
    &amp;lt;#if table.getName().equals(admin.getPrimaryDisplayTable(melati))&amp;gt;
     selected="selected"
      &amp;lt;#assign selected = true&amp;gt;
    &amp;lt;/#if&amp;gt;
   &amp;lt;/#if&amp;gt;
  &amp;lt;/#if&amp;gt;&amp;gt; ${ml.rendered(table.displayName)}&amp;lt;/option&amp;gt;
&amp;lt;/#list&amp;gt;&amp;lt;/select&amp;gt;


I am using BeanWrapper.

The documentation for #list
http://freemarker.sourceforge.net/docs/ref_directive_list.html
says, as far as I can understand, that an enumeration and and iterator
should be usable.

Sorry if this is a newbie error.

thanks in advance
Tim



&lt;/pre&gt;</description>
    <dc:creator>Tim Pizey</dc:creator>
    <dc:date>2012-03-09T17:31:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5344">
    <title>Get Node Value from Attribute</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5344</link>
    <description>&lt;pre&gt;Hi all,

Please help me how to access the value of Node that has attribute
&amp;lt; at &amp;gt;label='LastClase'.

Let say my data like this
&amp;lt;header&amp;gt;
  &amp;lt;data label="CompanyName"&amp;gt;Telstra Corporation Limited&amp;lt;/data&amp;gt;
  &amp;lt;data label="GICSIndustry"&amp;gt;Diversified Telecommunication Services&amp;lt;/data&amp;gt;
  &amp;lt;data label="LastClose"&amp;gt;3.25&amp;lt;/data&amp;gt;
  &amp;lt;data label="GICSIndustryGroup"&amp;gt;Telecommunication Services&amp;lt;/data&amp;gt;
  &amp;lt;data label="GICSSector"&amp;gt;Telecommunication Services&amp;lt;/data&amp;gt;
&amp;lt;/header&amp;gt;

I can access it from &amp;lt;data&amp;gt; index like ${doc.header.doc[2]} but I don't know
how to access it from &amp;lt; at &amp;gt;label value.

I try many ways but still got error
${header.data[&amp;lt; at &amp;gt;label='TradingStatus']}
${header.data.&amp;lt; at &amp;gt;label['TradingStatus']}
${header.data["&amp;lt; at &amp;gt;label='TradingStatus'"]}

Please help.....

--
View this message in context: http://freemarker.624813.n4.nabble.com/Get-Node-Value-from-Attribute-tp4456246p4456246.html
Sent from the freemarker-user mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Virtualization &amp;amp; Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
&lt;/pre&gt;</description>
    <dc:creator>pchainarong</dc:creator>
    <dc:date>2012-03-08T12:09:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5342">
    <title>FreeMarker 2.3.19 is out. Please read securitynotes!</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5342</link>
    <description>&lt;pre&gt;FreeMarker 2.3.19 is out!

Download:
http://sourceforge.net/projects/freemarker/files/freemarker/2.3.19/freemarker-2.3.19.tar.gz/download

GAE-compatible binary:
http://sourceforge.net/projects/freemarker/files/freemarker/2.3.19/freemarker-gae-2.3.19.jar/download


Changes
-------

Don't miss the security related changes, they may affect your
application!

Changes on the FTL side:

* Attention: The output of ISO 8601 date/time formatting built-ins,
  introduced in 2.3.17, was slightly changed. From now on, the time
  zone offset, when it's displayed and it isn't Z, always includes the
  minutes. For example, 15:30:15+02 becomes to 15:30:15+02:00 in the
  template output. Both formats are valid according to ISO 8601 (so
  anything that expects ISO 8601 date/times should continue working),
  but only the last format complies with the XML Schema date/time
  formats, hence this change.

* New built-in for escaping inside JSON string literals: json_string.

* Bugfix: Wrong # tags were printed as static text instead of causing
  parsing error if there was no correct # tag earlier in the same
  template. Since fixing this would not be 100% backward compatible,
  the old behavior has remained, unless you set the
  incompatible_enhancements setting
  (Configuration.setIncompatibleEnhancements(String)) to "2.3.19" or
  higher.

Changes on the Java side:

* Attention: This release contains two important security workarounds
  that unavoidably make it obvious how some applications can be
  exploited. FreeMarker can't solve these issues on all
  configurations, so please read the details instead of just updating
  FreeMarker! Also, these changes are not 100% backward compatible in
  theory, however it's not probable that they will break anything. The
  two changes are:

  - The character with character code 0 (\u0000) is not allowed in
    template paths anymore. When a path contains it, FreeMarker
    behaves as if the template was not found.

    This is to fix the security problem where a template path like
    "secret.txt\u0000.ftl" is used to bypass extension filtering in an
    application. FreeMarker itself doesn't care about the extension,
    but some applications decide based on the extension if they will
    delegate a path to FreeMarker. When they do with such a path, the
    C/C++ implementation behind the storage mechanism may sees the
    path as "secret.txt" as the 0 terminates the string in C/C++, and
    thus load a non-FTL file as a template, returning the file
    contents to the attacker.

    Note that some HTTP servers, notably Tomcat and Apache will block
    URL-s containing 0, but some others, like Jetty, doesn't.

  - ClassTemplateLoader, when it's created with base path "/" (like
    with new ClassTemplateLoader(someClass, "/")), will not allow
    template paths that contain colon earlier than any /, and will act
    like if the template was not found in such case.

    This is to fix the security problem where a template path like
    "file:/etc/secret" or "http://example.com/malware.ftl" is
    interpreted as a full URL by a java.net.URLClassLoader in the
    class-loader hierarchy. This is a quirk (or bug) of
    java.net.URLClassLoader.

    Beware, some frameworks use their own TemplateLoader
    implementations, and if those are vulnerable, they will remain so
    after updating FreeMarker too! Note that this exploit only works
    if the class-loader hierarchy contains an URLClassLoader and the
    class-loader is used to load templates without adding any prefix
    before the template path (other than "/").

  These security issues mostly affect applications where the user (the
  visitor) can supply arbitrary template paths. This is not the case
  with properly built MVC applications, as there only the Controller
  can be addressed directly, and it's the Controller who specifies the
  template paths. But MVC applications based on JSP Model-2 often
  expose the MVC Views as URL-s ending with .ftl, thus allowing the
  user to give arbitrary paths to FreeMarker. Such applications should
  be secured with a security-constratint in web.xml as shown here:
  http://freemarker.org/docs/pgui_misc_servlet.html#pgui_misc_servlet_model2
  This should be done regardless of the current security fixes.

* Configuration has new methods: removeTemplateFromCache(...). This
  will remove the given template for the given locale from the cache,
  so it will be re-loaded regardless of the template update delay when
  it's next time requested.

* BeansWrapper ignores setter methods from now when introspecting
  classes. They weren't used anyway, so they unnecessarily caused
  "java.beans.IntrospectionException: type mismatch between read and
  write methods" errors.

* TemplateClassResolver.SAFER_RESOLVER now disallows creating
  freemarker.template.utility.JythonRuntime and
  freemarker.template.utility.Execute. This change affects the
  behavior of the new built-in if FreeMarker was configured to use
  SAFER_RESOLVER, which is not the default until 2.4 and is hence
  improbable.

* Bug fixed: Calling varargs methods now indeed works. (Earlier it
  only worked for overloaded methods.)

* Bug fixed [1837697] [2831150] [3039096] [3165425]: Jython support
  now works with Jython 2.2 and 2.5.

* Bug fixed [3325103]: TemplateException-s and ParseException-s are
  now serializable.

&lt;/pre&gt;</description>
    <dc:creator>Daniel Dekany</dc:creator>
    <dc:date>2012-03-01T02:00:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5341">
    <title>Input requited for a RFI</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5341</link>
    <description>&lt;pre&gt;HI,

I am working on a RFI related to content adaptation and as part of that evaluating different templating engines. I am looking for a comparison matrix comparison Freemarker with other similar solutions. Kindly share the same if one available. Also any information on different parameters against which a templating engine should be evaluated will be helpful as well.

Since working on aggressive timelines, will appreciate an early response.

Thanks
Rajnish
------------------------------------------------------------------------------
Virtualization &amp;amp; Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>Rajnish Taneja</dc:creator>
    <dc:date>2012-02-29T05:52:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5334">
    <title>Cannot load template in Linux using SpringFreeMarkerConfigurationFactory</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5334</link>
    <description>&lt;pre&gt;Hi

I have a web app on Tomcat 6 that loads FreeMarker templates via
org.springframework.ui.freemarker.FreeMarkerConfigurationFactory. The web
app is plain JSP (not Spring MVC). The app works fine in a Windows
environment, but will not work on Linux (Slackware 13.37 64 bit). When I
run it on Linux it gives me a file not found exception. I have tried
multiple variations on this configuration including putting my templates
directory in the classpath, using Spring prefixes like "file:" and
"classpath:" for the templateLoaderPath.  Nothing has worked.  Please let
me know if you have any ideas to fix. Thanks, Peter.

    &amp;lt;!-- Freemarker template config factory. Works on Windows --&amp;gt;
    &amp;lt;bean id="freemarkerTemplateConfigFactory"
class="org.springframework.ui.freemarker.FreeMarkerConfigurationFactory"&amp;gt;
        &amp;lt;property name="templateLoaderPath" value="/WEB-INF/ftemplates/" /&amp;gt;
    &amp;lt;/bean&amp;gt;

    &amp;lt;bean id="templateService" class="com.mypkg.service.TemplateService"&amp;gt;
       &amp;lt;property name="configurationFactory"
ref="freemarkerTemplateConfigFactory" /&amp;gt;
    &amp;lt;/bean&amp;gt;
------------------------------------------------------------------------------
Virtualization &amp;amp; Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________
FreeMarker-user mailing list
FreeMarker-user&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freemarker-user
&lt;/pre&gt;</description>
    <dc:creator>Peter Kleczka</dc:creator>
    <dc:date>2012-02-22T21:12:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.freemarker.user/5332">
    <title>Calling macro with tricky parameter name</title>
    <link>http://comments.gmane.org/gmane.comp.web.freemarker.user/5332</link>
    <description>&lt;pre&gt;Hello all,

I have a macro that I want to use for producing html5 page (fragments). 
It looks like this:

&amp;lt;#macro input id params...&amp;gt;
&amp;lt;#list params?keys as param&amp;gt;
     Key: ${param}&amp;lt;br /&amp;gt;
     Value: ${params[param]}&amp;lt;br /&amp;gt;
&amp;lt;/#list&amp;gt;
&amp;lt;/#macro&amp;gt;

Question: How do I call that macro with parameter named data-custom with 
the value freemarker?

The naive aproach would have been:

&amp;lt;&amp;lt; at &amp;gt;input id="something" data-custom="freemarker" /&amp;gt;

Background:
In html5 they have the new convention that you can enter custom data 
attributes  on elements by using a data- prefix on all attributes. I 
suspect that my question is likely to reoccur in the future as html5 
becomes more common.

I've browsed through the FAQ and .vars in mentioned for accessing the 
variables but that isn't a problem me (since I'm iterating through params).

Is there a way to specify a tricky parameter name somehow?

Thanks in advance!

//Jerker


------------------------------------------------------------------------------
Virtualization &amp;amp; Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
&lt;/pre&gt;</description>
    <dc:creator>Jerker Klang</dc:creator>
    <dc:date>2012-02-22T15:21:31</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.web.freemarker.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.web.freemarker.user</link>
  </textinput>
</rdf:RDF>

