What is velocity2js? Velocity2Js compiles Apache Velocity templates to JavaScript functions. These functions can be used in ajax based web applications. Velocity2Js provides an ant task to integrate template compilation in an existing build process. Take Advantages of Templates When using Ajax and JSON to implement dynamic wep applications, one quick runs into writing JavaScript functions with a b