volocity
文章平均质量分 73
小立攻城狮
这个作者很懒,什么都没留下…
展开
-
volocity加载模板&输出
1、通过绝对路径加载vm模板 //初始化模板引擎 VelocityEngine ve = new VelocityEngine(); ve.init(); //根据绝对路径获取模板 Template template = ve.getTemplate("d:/test.vm"); //velocity上下文context VelocityContext contex原创 2015-03-31 21:59:02 · 527 阅读 · 0 评论 -
action通过VM生成文件并导出
//引擎 VelocityEngine ve = new VelocityEngine(); Properties props = new Properties(); props.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, this.httpRequest.getSession().getServletContext().getR原创 2015-03-31 21:47:14 · 714 阅读 · 0 评论 -
volocity脚本语法
volocity脚本语句都是以#打头,包括#if、#else、#end、#foreach、#break、#include、#parse、#macro、#set等。 1、#if逻辑判断 支持的运算符有==、!= 、>、=、 #if(1==1) ... #end #if(1!=1) ... #end #if(1<2) ... #end #if(1>0) ... #end #if(1<2)原创 2015-04-03 21:48:12 · 1770 阅读 · 0 评论