<?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.jakarta.velocity.user">
    <title>gmane.comp.jakarta.velocity.user</title>
    <link>http://blog.gmane.org/gmane.comp.jakarta.velocity.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.jakarta.velocity.user/15288"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15285"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15276"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15266"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15260"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15256"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15251"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15247"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15245"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15242"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15238"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15236"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15234"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15232"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15229"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15222"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15218"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15215"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15212"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15204"/>
      </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.jakarta.velocity.user/15288">
    <title>Velocity into a plug-in</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15288</link>
    <description>&lt;pre&gt;Hi all ,

I'm using velocity in a plug-in projet.In the root of my plugin
i put a folder templates/template.vm. And i call the template
velocity.getTemplate(template.vm) from my class.
But the resource is not found i don't no why its directory isn't
recognised.the template cannot be loaded.

Every thing work fine in a java-Project.
 I will appreciate any help.
Thanks.
&lt;/pre&gt;</description>
    <dc:creator>vanessa vanessa</dc:creator>
    <dc:date>2012-05-26T16:13:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15285">
    <title>Added Velocity language parser to CodeMirror</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15285</link>
    <description>&lt;pre&gt;Just a note to say that I've contributed a language parser/colourizer mode for Velocity to the rather excellent free js package CodeMirror http://codemirror.net/
Looks good but if you spot something I've missed, let me know
&lt;/pre&gt;</description>
    <dc:creator>Steve O'Hara</dc:creator>
    <dc:date>2012-05-19T07:11:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15276">
    <title>More 1.7 BC issues (porting from 1.5)</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15276</link>
    <description>&lt;pre&gt;Hi, I have this use case which involves 2 nested macros and a foreach.
I am trying to understand why this template evaluates to empty string
on 1.7, and to "foobaryokdar" - on 1.5.


String template = "#set($global_types=['foo', 'bar', 'yok',
'dar'])#macro( showBox $input)#set($type = \"\")$input#end"+
                "#macro(showBoxes $types)#foreach($type in
$types)#showBox($type)#end#end#showBoxes($global_types)";
&lt;/pre&gt;</description>
    <dc:creator>Boris Partensky</dc:creator>
    <dc:date>2012-05-03T18:17:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15266">
    <title>is it possible to maintain a foreach directive after a VelocityEngine.evaluate()?</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15266</link>
    <description>&lt;pre&gt;Hi,

 

I have an oddball case where I need a multi-stage Velocity template
evaluation.  That is, image a pipelined process where:

 

-          Task one grabs a Velocity template, adds some (but not all) items
to the Context, evaluates, and sends the partially resolved output as input
to task two

-          Task two adds some (but not all) items to the Context, evaluates.

 

I know I can have variables like ${object1.member1} that will be preserved
in the output after evaluate() if object1 is not resolved, however, is it
possible to maintain a foreach directive after an evaluation:

 

## preserve this 'foreach' in the output if object1 is not resolved

#foreach( $element in $object1.elements )

#end

 

Thanks in advance,

John

&lt;/pre&gt;</description>
    <dc:creator>John McNair</dc:creator>
    <dc:date>2012-04-30T18:44:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15260">
    <title>upgrading from 1.5 to 1.7 compatibility issues</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15260</link>
    <description>&lt;pre&gt;Hello, while going through the upgrade I noticed an incompatible
behavior during nested macro evaluation. Looks like in 1.7 (all
default properties) child macro has access to variables set in parent
macro scope (and those take precedence over globals), and 1.5 sees
globals. In the following example, in 1.5 unit test the following
template will evaluate to "globalvar", and in 1.7 - to
"outermacroparam". Is this expected behavior?


1.5 test case


public void testVelocityNestedMacroScope() throws Exception
    {
        VelocityEngine ve = new VelocityEngine();

        ve.init();

        String template = "#macro(outerMacro $arg1)"+
                          "#innerMacro('blah')"+
                          "#end"+
                          "#macro(innerMacro $arg2)$arg1#end"+

"#set($arg1='globalval')#outerMacro('outermacroparam')";
        StringWriter eval = new StringWriter();
        boolean b = ve.evaluate(new VelocityContext(), eval, "foo", template);
        assertEquals(eval.toString(), "globalval",&lt;/pre&gt;</description>
    <dc:creator>Boris Partensky</dc:creator>
    <dc:date>2012-04-30T15:49:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15256">
    <title>Configuring number of parsers and buffer sizes</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15256</link>
    <description>&lt;pre&gt;All,

I've been looking at the docs for both Velocity Tools and Velocity
itself and I can't seem to find out what the properties are for
controlling the number of template parsers to create and how big their
buffer sizes are.

I've been doing some memory profiling of my webapp and it looks like
Velocity is keeping some rather large (and empty -- probably because
they haven't yet been used) buffers for parsing.

I can see a bunch (76) of int[4096] arrays within VelocityCharStream
(the class member is 'bufline'), and I can also see buried in
VelocityCharStream which uses an InputStreamReader ('inputStream') a
byte[8192] which appears to exist 48 separate times.

So, the total "wasted" space due to these two arrays (duplicated a bunch
of times) is, on the face of it, small: it's like 1-2MiB. On the other
hand, if I don't need all that buffer space, I'd like to remove it.

So, first: how can I configure the number of parsers and possibly the
buffer sizes used by them?

Second: is VelocityCharStream essentially d&lt;/pre&gt;</description>
    <dc:creator>Christopher Schultz</dc:creator>
    <dc:date>2012-04-27T00:59:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15251">
    <title>Velocity to generate GWT Code</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15251</link>
    <description>&lt;pre&gt;Hello ,
I'm new to Velocity and I have to generate with the velocity engine
GWT web pages.How can I proceed ? and which version i have to install ?

Thanks in advance.
Kind regards .
&lt;/pre&gt;</description>
    <dc:creator>vanessa vanessa</dc:creator>
    <dc:date>2012-04-19T16:23:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15247">
    <title>getting session id</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15247</link>
    <description>&lt;pre&gt; 
I want to be get the user's session id in my VM page.
 
How do I do that?
 
I have found references to $request.getSession() but this does not work.  $request and $session are not bound so I can't figure out how I can get the session id.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe&amp;lt; at &amp;gt;velocity.apache.org
For additional commands, e-mail: user-help&amp;lt; at &amp;gt;velocity.apache.org&lt;/pre&gt;</description>
    <dc:creator>Michael Remijan</dc:creator>
    <dc:date>2012-04-18T18:46:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15245">
    <title>Handling of primitive type arrays</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15245</link>
    <description>&lt;pre&gt;Hi list,

I was wondering how arrays of primitives are handled in Velocity. I feel 
that they are converted to List&amp;lt;&amp;gt; and then we cannot invoke methods with 
them as parameters.

Let's take an example:

#set($array = [$ref.getLong(), $ref.getLong(), $ref.getLong()] # where 
$ref.getLong() returns a long (primitive type)
#ref.invokeSomeMethod($array) # where the signature is actually public 
void invokeSomeMethod(long[] values)

How can I get this to work?

Cheers,
Guillaume
&lt;/pre&gt;</description>
    <dc:creator>Guillaume Polet</dc:creator>
    <dc:date>2012-04-18T17:51:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15242">
    <title>ReferenceInsertionEventHandler</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15242</link>
    <description>&lt;pre&gt;Hi everyone,
quick question about the ReferenceInsertionEventHandler: is it supposed to be called on a variable called into a #foreach loop (or even on the variable defining the foreach loop)?

For example:

public class IsThisAVelocityBug {

public static void main( String[] args ) {
String template1 = "${otherVariable}\n";
String template2 = "#foreach($test in $testing)\n${test.something}\n${otherVariable}\n#end";

VelocityEngine veloctiyEngine = new VelocityEngine();

VelocityContext velocityContext = new VelocityContext();
EventCartridge eventCartridge = new EventCartridge();
velocityContext.attachEventCartridge( eventCartridge );

eventCartridge.addReferenceInsertionEventHandler( new ReferenceInsertionEventHandler() {

&amp;lt; at &amp;gt;Override
public Object referenceInsert( String reference, Object value ) {
System.out.println( "Inserting : " + reference );
return reference;
}
} );

System.out.println( "template1" );
veloctiyEngine.evaluate( velocityContext, new StringWriter(), "t&lt;/pre&gt;</description>
    <dc:creator>Jean-Francois Croteau</dc:creator>
    <dc:date>2012-03-30T13:45:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15238">
    <title>Velocity engine 2.0 release</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15238</link>
    <description>&lt;pre&gt;
Any ideas when velocity 2.0 release is going to happen. I am unable to 
port from a competing product because velocity 1.7 doesn't have default 
arguments for macros. But I see that in 2.0, so I am wondering when I 
will be able to move to Velocity.

Thanks.
&lt;/pre&gt;</description>
    <dc:creator>Nikhil G. Daddikar</dc:creator>
    <dc:date>2012-03-26T13:47:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15236">
    <title>Velocity syntax</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15236</link>
    <description>&lt;pre&gt;Hello,

I was looking at Velocity syntax and have a few questions.

What is use of parenthesis in the #set directive: #set ($x = 1) Why not 
simply: #set $x = 1 ?

Another question is regarding curly braces: What is the use of curly 
braces in the directives? E.g. #{set} ($x = 1)

I am sure there are good reasons, just would like to know why.

Thanks.
&lt;/pre&gt;</description>
    <dc:creator>Nikhil G. Daddikar</dc:creator>
    <dc:date>2012-03-26T07:36:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15234">
    <title>issue with vm code not being interpreted</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15234</link>
    <description>&lt;pre&gt;
Hi,

I am having some issues with part of an expression that is not interpreted.
Sorry if this is dumb question but I spent a couple of hours trying to solve
this and could not (I am not very experienced in velocity)

This template processes a response from apache solr search server. I have an
almost exactly equal template running fine, and I looked at the differences
and could not find any.

Code looks like this:

#if($params.getBool("debugQuery",false))
   # toggle explain 
  &amp;lt;pre
style="display:none"&amp;gt;$response.getExplainMap().get($doc.getFirstValue('id'))&amp;lt;/pre&amp;gt;
&amp;lt;/pre&amp;gt;
   # toggle all fields 
  &amp;lt;pre2 style="display:none"&amp;gt;
  #foreach($fieldname in $doc.fieldNames)
     &amp;lt;br&amp;gt;
       $fieldname :
       
       #foreach($value in $doc.getFieldValues($fieldname))
         $value  
       #end
       
  #end
   &amp;lt;/br&amp;gt;
  &amp;lt;/pre2&amp;gt;
#end

The problem is '$response.getExplainMap().get($doc.getFirstValue('id'))'
appears as is then the page, is not interpreted. response is the response
from solr so has a bunch of info.
&lt;/pre&gt;</description>
    <dc:creator>jmlucjav</dc:creator>
    <dc:date>2012-03-22T08:26:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15232">
    <title>[ANNOUNCE] Velosurf 2.3</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15232</link>
    <description>&lt;pre&gt;Velosurf 2.3 has just been released.

This release brings several new features, among which 'upsert' methods,
per-field dirty flags, a cleaner syntax to specify external parameters
for a query (aka 'parametrized getters'), some meta-information
methods... It also provides several bugfixes and optimizations related
to statements pools handling, database reverse enginering, connections
checking and instance caching.

It can be downloaded from:
http://sourceforge.net/projects/velosurf/files/velosurf/2.3/velosurf-2.3.tgz/download


  --
  Claude
&lt;/pre&gt;</description>
    <dc:creator>Claude Brisson</dc:creator>
    <dc:date>2012-03-09T16:45:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15229">
    <title>Minimum version for Velocity and Velocity Tools?</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15229</link>
    <description>&lt;pre&gt;All,

I took a quick look at the Velocity site and I wasn't able to find a
minimum supported version of Java for Velocity and Velocity Tools. I'm
writing a patch and I'd like to know if I need to stay away from
anything too recent.

It looks like we require Java 1.5+ in order to actually build Velocity
Tools (generics, etc.), but I'm not sure about any runtime considerations.

Thanks,
-chris

&lt;/pre&gt;</description>
    <dc:creator>Christopher Schultz</dc:creator>
    <dc:date>2012-03-07T17:06:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15222">
    <title>[tools] Generating XHTML-compliant Javascript with ValidatorTool</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15222</link>
    <description>&lt;pre&gt;All,

As an exercise, I decided to change my response content type from
text/html to application/xhtml+xml as we are truly attempting to emit
XHTML in all cases. I decided to see what Firefox would say if we did this.

I found that any template that uses the validator tool to generate
Javascript form validation ended up creating code like this:

    function validateMyForm(form) {
      if (bCancel)
          return true;
      else
 var formValidationResult;
       formValidationResult = validateInteger(form) &amp;amp;&amp;amp;
validateRequired(form) &amp;amp;&amp;amp; validateMaxLength(form) &amp;amp;&amp;amp; validateMask(form)
&amp;amp;&amp;amp; validateIntRange(form);
     return (formValidationResult == 1);
   }

I have "xhtml" set to true in my (admittedly) old-style configuration:

&amp;lt;toolbox&amp;gt;
  &amp;lt;tool&amp;gt;
    &amp;lt;key&amp;gt;validator&amp;lt;/key&amp;gt;
    &amp;lt;scope&amp;gt;request&amp;lt;/scope&amp;gt;
    &amp;lt;class&amp;gt;org.apache.velocity.tools.struts.ValidatorTool&amp;lt;/class&amp;gt;
  &amp;lt;/tool&amp;gt;
  ...
  &amp;lt;xhtml&amp;gt;true&amp;lt;/xhtml&amp;gt;
&amp;lt;/toolbox&amp;gt;

...but the code still emits '&amp;amp;&amp;amp;' as the operator with no escaping.

It appears that a trivial fix f&lt;/pre&gt;</description>
    <dc:creator>Christopher Schultz</dc:creator>
    <dc:date>2012-03-06T01:15:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15218">
    <title>formatting issues in Swedish characters in linux</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15218</link>
    <description>&lt;pre&gt;hi,

this is my first post on the mailing list. currently i'm facing some
problems with velocity.

i'm developing on a ubuntu 11.04 machine and as a part of my customers
requirement i need to send a password recovery mail to the users of the
system. i'm using a velocity template to generate the mail and since the
customer is swidsh based i have some swidish characters in the template.

the problem arises when the project is build on linux where the swidish
charactors comes as junk. this works fine when build in windows. i'm stuck
with this issue for 2 days now and please give me some pointers to fix this
issue. thanks in advance.

&lt;/pre&gt;</description>
    <dc:creator>Chathuraka Waas</dc:creator>
    <dc:date>2012-03-01T07:08:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15215">
    <title>Odd error message regarding persistence</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15215</link>
    <description>&lt;pre&gt;With the following line:
ObjectifyService.register(FeedParameters.class);
I get the following error:
org.apache.velocity.tools.config.ConfigurationException: Couldn't find 
necessary supporting classes for: Unsupported Tool 'userdata' =&amp;gt; 
feedthistothat.UserData with 1 properties [key -auto-&amp;gt; userdata; 
](java.lang.NoClassDefFoundError: javax/persistence/Entity)

Any ideas what would cause this to happen?

Cheers,

Andy
&lt;/pre&gt;</description>
    <dc:creator>Andrew Ducker</dc:creator>
    <dc:date>2012-02-13T14:19:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15212">
    <title>Dynamic Templates</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15212</link>
    <description>&lt;pre&gt;
I thought I would share the following code with the Apache Velocity
community.


Problem Description:  I wanted to use Dynamic Templates though I found the
following had massive performance implications.

&lt;/pre&gt;</description>
    <dc:creator>Mark-12345</dc:creator>
    <dc:date>2012-02-09T22:47:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15204">
    <title>Validate templates before use</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15204</link>
    <description>&lt;pre&gt;Is there a way to "validate" a template prior to using it?  I'd like
to check that some user supplied templates are, at least, parsable
during system startup.

Thanks.

&lt;/pre&gt;</description>
    <dc:creator>Chad La Joie</dc:creator>
    <dc:date>2012-02-06T12:17:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15202">
    <title>Most efficient evaluation</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.velocity.user/15202</link>
    <description>&lt;pre&gt;I'm looking for the most efficient/performant way to evaluate a
template and have some questions surrounding this.

1. Are Template objects reusable and thread safe?  If they're just
ASTs, it seems like they should be.

2. Does the Velocity/VelocityEngine class cache compiled templates (as
Template objects or anything else)?

3. If yes to both above, is there really any difference between
calling Velocity[Engine].merge and Template.merge?

Thanks.

&lt;/pre&gt;</description>
    <dc:creator>Chad La Joie</dc:creator>
    <dc:date>2012-02-04T15:58:34</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.jakarta.velocity.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.jakarta.velocity.user</link>
  </textinput>
</rdf:RDF>

