为什么自己写的fis velocity toolss不能使用

查看: 6461|回复: 2
在用velocity时候,为什么会出现这样的错误?
论坛徽章:0
在用velocity时候,为什么会出现这样的错误?
VelocityViewServlet : Error processing the template
Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 199, column 120. Encountered: &q& (113), after : &&&
org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 199, column 120.&&Encountered: &q& (113), after : &&&
& & & & at org.apache.velocity.Template.process(Template.java:141)
& & & & at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:423)
& & & & at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:341)
& & & & at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:831)
& & & & at org.apache.velocity.runtime.directive.Parse.render(Parse.java:141)
& & & & at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114)
& & & & at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
& & & & at org.apache.velocity.Template.merge(Template.java:256)
& & & & at org.apache.velocity.tools.view.servlet.VelocityViewServlet.mergeTemplate(VelocityViewServlet.java:592)
& & & & at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:417)
& & & & at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:373)
& & & & at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
& & & & at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
& & & & at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
& & & & at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
& & & & at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
& & & & at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
& & & & at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
& & & & at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
& & & & at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
& & & & at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
& & & & at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
& & & & at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
& & & & at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
& & & & at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
& & & & at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
& & & & at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
& & & & at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
& & & & at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
& & & & at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
& & & & at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
& & & & at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
& & & & at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:278)
& & & & at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
& & & & at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
& & & & at org.zblog.servlet.EncodingFilter.doFilter(EncodingFilter.java:35)
& & & & at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
& & & & at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
& & & & at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
& & & & at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
& & & & at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
& & & & at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
& & & & at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
& & & & at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
& & & & at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
& & & & at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
& & & & at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
& & & & at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
& & & & at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
& & & & at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
& & & & at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
& & & & at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
& & & & at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
& & & & at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
& & & & at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
& & & & at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
& & & & at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
& & & & at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
& & & & at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
& & & & at java.lang.Thread.run(Thread.java:595)
论坛徽章:11
VelocityViewServlet : Error processing the template
Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 199, column 120. Encountered: &q& (113), after : &&&
org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 199, column 120. Encountered: &q& (113), after : &&&
错误好像就在这儿里
论坛徽章:0
原来是vm模板文件的字符有问题...
itpub.net All Right Reserved. 北京皓辰网域网络信息技术有限公司版权所有    
 北京市公安局海淀分局网监中心备案编号: 广播电视节目制作经营许可证:编号(京)字第1149号2698人阅读
Velocity(30)
该问题请参考:
http://www.oschina.net/question/22
先把该帖子上的内容本分转过来,然后加上自己的解决方法
初学Velocity,想写个VelocityTool类实现以相对路径方式嵌入动态页面,思路大致与中一样,因为新版中init(Object
arg0)方法已经Deprecated了,换用configure(Map props)(见最下面和),代码如下:&
import java.util.M
import org.apache.velocity.VelocityC
import org.apache.velocity.tools.view.ViewC
public class VelocityTool {
protected VelocityC
public void configure(Map props) {
Object obj = props.get(&velocityContext&);
if (obj instanceof ViewContext) {
ViewContext viewContext = (ViewContext)
velocity = (VelocityContext) viewContext.getVelocityContext();
public String cur_templete() {
return velocity.getCurrentTemplateName();
public class VelocityTools {
private ViewC
protected HttpServletR
public VelocityTools() {
System.out.println(&sssssssssssssssssssssssssssssssssssss&);
public void configure(Map&?, ?& props) {
Object obj = props.get(&velocityContext&);
if (obj instanceof ViewContext) {
context = (ViewContext)
request = context.getRequest();
public void init(Object arg0) {
System.out.println(&init&);
// scope: request or session
if (arg0 instanceof ViewContext) {
System.out.println(&vvvvvvvvvvvvvvvcccccccccccccccccccc&);
// scope: application
else if (arg0 instanceof ServletContext) {
System.out.println(&sssssssssssssssssssscccccccccccccccccccc&);
虽然ViewTool接口被去掉了,但是可以添加上方法:
public void init(Object arg0) 会自动执行的。
下面这段代码在apache的官网上有解释,英文不好,单仔细一看就明白了。
连接时相关问题的链接
http://velocity.apache.org/tools/devel/creatingtools.html
把apache官网上的话复制一下。
If you want to allow your tool to be configured, you have two options:
add a public setter for each propertyadd a public void configure(Map props) method
You can, of course, do both, but if you do so keep in mind that the specific setters will be called before the configure() method. The application of configuration properties to specific setters is done usingmons.beanutils.PropertyUtils
from the Commons-BeanUtils project, so the rules follow the typical bean property conventions.
public VelocityTools() {
System.out.println(&do constructor VelocityTools&);
public void configure(Map&?, ?& props) {
Object obj = props.get(&velocityContext&);
if (obj instanceof ViewContext) {
context = (ViewContext)
request = context.getRequest();
}取到的实例是个ChainedContext类型,但是他集成了ViewContext 直接使用&
obj instanceof ViewContext就可以了。这点不会报错的。
属性:deprecationSupportMode 默认是ture值。
而方法setDeprecationSupportMode(boolean support) 不赞成使用了
在createContext()方法中创建context的类型一定是ChainedContext
VelocityView.java
private boolean deprecationSupportMode =
& @Deprecated
&&& protected final void setDeprecationSupportMode(boolean support)
&&&&&&& if (deprecationSupportMode != support)
&&&&&&&&&&& this.deprecationSupportMode =
&&&&&&&&&&& debug(&deprecationSupportMode is now %s&, (support ? &on& : &off&));
* &p&Creates and returns an initialized Velocity context.&/p&
* A new context of class {@link ViewToolContext} is created and
* initialized.
* @param request servlet request from client
* @param response servlet reponse to client
public ViewToolContext createContext(HttpServletRequest request,
HttpServletResponse response)
if (this.deprecationSupportMode)
ctx = new ChainedContext(velocity, request, response, servletContext);
ctx = new ViewToolContext(velocity, request, response, servletContext);
prepareContext(ctx, request);
}在OldToolInfo.java中使用反射获取init方法是否存在
protected Method getInit()
if (this.init == null)
// try to get an init(Object) method
this.init =
getToolClass().getMethod(&init&, new Class[]{ Object.class });
catch (NoSuchMethodException nsme)
return this.
附上代码清单
package org.apache.velocity.
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.
See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.
The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* &License&); you may not use this file except in compliance
* with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* &AS IS& BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied.
See the License for the
* specific language governing permissions and limitations
* under the License.
import java.lang.reflect.M
import java.util.M
import org.apache.velocity.tools.ToolC
* Manages old tools which still use the deprecated init() method.
* @author Nathan Bubna
* @version $Id: OldToolInfo.java 674
05:11:51Z liu_peng $
public class OldToolInfo extends ToolInfo
private static final long serialVersionUID = -7288761L;
public static final String INIT_METHOD_NAME = &init&;
private transient M
* Creates a new instance using the minimum required info
* necessary for a tool.
public OldToolInfo(String key, Class clazz)
super(key, clazz);
protected Method getInit()
if (this.init == null)
// try to get an init(Object) method
this.init =
getToolClass().getMethod(&init&, new Class[]{ Object.class });
catch (NoSuchMethodException nsme)
return this.
* @param clazz the java.lang.Class of the tool
public void setClass(Class clazz)
super.setClass(clazz);
// clear any existing init method
this.init =
protected void configure(Object tool, Map&String,Object& configuration)
// have specific setters and configure(Map) called first
super.configure(tool, configuration);
Method init = getInit();
if (init != null)
// ctx should, in all cases where a tool has such a method,
// actually be a View(Tool)Context, but we don't want to link
// to that class here, so as not to pollute the generic jar
Object ctx = configuration.get(ToolContext.CONTEXT_KEY);
if (ctx != null)
invoke(init, tool, ctx);
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:150624次
积分:2458
积分:2458
排名:第12960名
原创:70篇
转载:188篇
评论:12条
(1)(2)(6)(19)(8)(1)(27)(42)(20)(26)(12)(5)(1)(1)(4)(22)(56)(3)(3)velocity在spring中的使用 -
- ITeye技术网站
博客分类:
之前做搜索时候,前台展示使用了velocity,由于时间比较急,所以也没深入使用,这里主要记一下配置及简单使用
1 web.xml文件里的配置:
&!-- Velocity 的配置 --&
&servlet-name&velocity&/servlet-name&
&servlet-class&
org.apache.velocity.tools.view.servlet.VelocityViewServlet
&/servlet-class&
&init-param&
&param-name&org.apache.velocity.toolbox&/param-name&
&param-value&classpath:toolbox.xml&/param-value&
&/init-param&
&init-param&
&param-name&org.apache.velocity.properties&/param-name&
&param-value&classpath:velocity.properties&/param-value&
&/init-param&
&load-on-startup&10&/load-on-startup&
&/servlet&
&servlet-mapping&
&servlet-name&velocity&/servlet-name&
&url-pattern&*.vm&/url-pattern&
&/servlet-mapping&
&!-- Velocity 的配置结束 --&
toolbox.xml,velocity有自己决定放到什么位置,这里指定路径就可以
velocity.properties里velocimacro.library = VM_global_library.vm,所指文件在下面velocityConfigurer指定的resourceLoaderPath下
当然要加入需要的jar包,
velocity-1.4.jarvelocity-dep-1.4.jarvelocity-dvsl-1.0.jarvelocity-tools-1.4.jarvelocity-tools-generic-1.4.jarvelocity-tools-view-1.4.jar 有这些就全了,呵呵
2 配置viewResolver
首先必须要先配置velocityConfigurer
&bean id="velocityConfigurer"
class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"&
&property name="configLocation"&&value&classpath:velocity.properties&/value&&/property&
&property name="resourceLoaderPath"&
&value&WEB-INF/velocity/&/value&
&/property&
&property name="velocityProperties"&
&prop key="directive.foreach.counter.name"&
loopCoounter
&prop key="directive.foreach.counter.initial.value"&
&prop key="input.encoding"&UTF-8&/prop&
&prop key="output.encoding"&UTF-8&/prop&
&prop key="contentType"&text/charset=UTF-8&/prop&
&/property&
resourceLoaderPath指定页面存放的文件夹,会自动到这个文件夹下找文件
第二处主要制定编码,防止页面出现乱码的情况,虽然在src的velocity.properties里也指定了编码但还是出现乱码的情况,这边重新指定。
&bean id="viewResolver"
class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"&
&property name="suffix"&
&value&.vm&/value&
&/property&
&property name="exposeRequestAttributes"&
&value&true&/value&
&/property&
&property name="exposeSessionAttributes"&
&value&true&/value&
&/property&
&property name="contentType"&
&value&text/charset=UTF-8&/value&
&/property&
&property name="toolboxConfigLocation" value="toolbox.xml"/&--&
&property name="toolboxConfigLocation"&--&
&value&toolbox.xml&/value&--&
&/property&--&
这样基本就可以用了,,vm文件放在web-inf/velocity下
&property name="errorView"&
&value&results&/value&会找到web-inf/velocity下的results.vm文件
&/property&
4 还没深入研究
&property name="toolboxConfigLocation" value="toolbox.xml"/&--&&!--
&property name="toolboxConfigLocation"&--&&!--
&value&toolbox.xml&/value&--&&!--
&/property&--&不知道为什么toolbox不能用,总是报
java.lang.NullPointerException at org.springframework.web.servlet.view.velocity.VelocityToolboxView.createVelocityContext(VelocityToolboxView.java:114)错误,toolbox.xml放到web-inf/velocity下也不行,有知道的朋友说一下,网上搜了半天,只有两个韩国网站,又看不懂韩语,呵呵
浏览 14561
terryzz 写道"&&!--&&&&&&& &property name="toolboxConfigLocation" value="toolbox.xml"/&--&& &!--&&&& &property name="toolboxConfigLocation"&--&& &!--&&&&&&&& &value&toolbox.xml&/value&--&& &!--&&&& &/property&--&貌似我的也不行& 虽然没有报错& 但是工具没起到作用——————我也是配置不报错,但是没起作用是路径问题,toolboxConfigLocation默认是去WEB-INF下找的,如果配置文件在源码目录下,编译后对应的路径是在WEB-INF/classes下的,这时候要写成WEB-INF/classes/.../toolbox.xml,"..."根据配置文件具体层次写
"&&!--&&&&&&& &property name="toolboxConfigLocation" value="toolbox.xml"/&--&& &!--&&&& &property name="toolboxConfigLocation"&--&& &!--&&&&&&&& &value&toolbox.xml&/value&--&& &!--&&&& &/property&--&貌似我的也不行& 虽然没有报错& 但是工具没起到作用——————我也是配置不报错,但是没起作用
&property name="toolboxConfigLocation" value="/WEB-INF/toolbox.xml"/&我的可以。。有机会再用的时候试试
crazycat03
浏览: 133346 次
来自: 呼和浩特
奶油花生 写道terryzz 写道&&& ...
terryzz 写道&&&!--
createVelocityContext这个问题我也遇到了, ...
请教一个问题,compass 和 terracotta 整合的 ...
碧落海的风 写道&property name=&quot ...在velocity使用toolbox.xml
首先必须在web.xml中添加: &init-param& &param-name&org.apache.velocity.toolbox&/param-name& &param-value&/WEB-INF/toolbox.xml&/param-value&&&&&& &/init-param& 才可以使用toolbox.xml中定义的变量。 举例说明用法 比如我要使用日期,可以如下定义: &toolbox& &tool& && &key&date&/key& && &scope&application&/scope& && &class&org.apache.velocity.tools.generic.DateTool&/class& && &parameter name="format" value="yyyy-M-d"/& &/tool& &/toolbox& 这里DateTool是velocity为我们预定义的工具类,还有很多其他工具类(比如:MathTool,ListTool,SortTool...) date是这个类的实例,这样我们就可以在.vm中使用$date来引用DateTool中的方法了,如& $date.get('yyyy-M-d H:m:s') 如果我们要使用自己的类,只需要把org.apache.velocity.tools.generic.DateTool这部分替换成自己定义的类,然后再初始化该类的实例,比如&key&class&/key& 在.vm中这样用$class.getXXX() toolbox.xml典型配置:
Java代码 &
&?xml&version="1.0"&encoding="UTF-8"?& &&
============================================================= &&
&&@(#)&toolbox.xml &&
&&Copyright&(c)&2005,&HOBOKEN&Project,&All&Rights&Reserved. &&
============================================================= &&
&toolbox& &&
&&&&&!--&[&DateTool&] &&
&&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.0&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&date&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.DateTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&MathTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.0&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&math&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.MathTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&NumberTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.2&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&number&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.NumberTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&RenderTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.0&&
&&&&&tool& &&
&&&&&&&&&key&render&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.RenderTool&/class& &&
&&&&&/tool& &&
&&&&--& &&
&&&&&!--&[&EscapeTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.2&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&esc&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.EscapeTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&ResourceTool&] &&
&&&&&&&&&&&&&&&@see&http:&&
&&&&&&&&@since&Velocity&1.3&&
&&&&&tool& &&
&&&&&&&&&key&text&/key& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.ResourceTool&/class& &&
&&&&&&&&&parameter&name="bundles"&value="resources,prj.hoboken.patrasche.resources.PatrascheResources"&/& &&
&&&&&&&&&parameter&name="locale"&value="ja_JP"&/& &&
&&&&&/tool& &&
&&&&--& &&
&&&&&!--&[&AlternatorTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.2&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&alternator&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.AlternatorTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&ValueParser&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.2&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&parser&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.ValueParser&/class& &&
&&&&&/tool& &&
&&&&&!--&[&ListTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.2&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&list&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.ListTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&SortTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.2&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&sorter&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.SortTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&IteratorTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.0&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&mill&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.generic.IteratorTool&/class& &&
&&&&&/tool& &&
&&&&&&&& &&
============================================================ &&
&&[&TOOL&FOR&STRUTS&TAGLIB&] &&
============================================================ &&
&&&&&!--&[&ActionMessagesTool&]&&&&&&&&  &&
&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.1&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&messages&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.struts.ActionMessagesTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&ErrorsTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.0&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&errors&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.struts.ErrorsTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&FormTool&] &&
&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.0&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&form&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.struts.FormTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&MessageTool&] &&
&&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.0&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&resource&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.struts.MessageTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&StrutsLinkTool&] &&
&&&&&&&&LinkTool&&&&&&&&& &&
&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.0&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&slink&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.struts.StrutsLinkTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&SecureLinkTool&] &&
&&&&&&&&LinkTool&&&&&&&&& &&
&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.1&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&sslink&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.struts.SecureLinkTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&TilesTool&] &&
&&&&&&&&Tiles&&&&&&&&& &&
&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.1&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&tiles&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.struts.TilesTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&ValidatorTool&] &&
&&&&&&&&Validator&&&&&&&&& &&
&&&&&&&&@see&http:&&
&&&&&&&&@see&http:&&
&&&&&&&&@since&VelocityTools&1.1&&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&validator&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&org.apache.velocity.tools.struts.ValidatorTool&/class& &&
&&&&&/tool& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&app_version&/key&&value&3.0&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&app_name&/key&&value&Patrasche&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&next&/key&&value&/images/icon/next.jpg&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&prev&/key&&value&/images/icon/prev.jpg&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&top-page&/key&&value&/images/icon/top-page.jpg&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&last-page&/key&&value&/images/icon/last-page.jpg&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&pageIcon&/key&&value&/images/icon/page.png&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&bookIcon&/key&&value&/images/icon/book.png&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&defaultStyle&/key&&value&./web/default.css&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&key&errorMetaHeader&/key&&value&/error/default_header.vm&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&errorStyle&/key&&value&/error/error.css&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&detailOfHTTP&/key&&value&./error/detail_HttpError.vm&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&detailOfSERV&/key&&value&./error/detail_ServerError.vm&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&multiPart&/key&&value&enctype='multipart/form-data'&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&parentMark&/key&&value&..&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&chartToolTips&/key&&value&toolTips&/value& &&
&&&&&/data& &&
&&&&&data&type="string"& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&key&chartClickable&/key&&value&isClickable&/value& &&
&&&&&/data& &&
&&&&&!--&[&NullTool&] &&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&null&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&pany.util.velocity.NullTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&StringTool&] &&
&&&&&&&&文字操作&&&&&&&& &&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&words&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&pany.util.velocity.StringTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&PageScrolllTool&] &&
&&&&&&&&&&&&&&&& &&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&pager&/key& &&
&&&&&&&&&scope&session&/scope& &&
&&&&&&&&&class&pany.util.velocity.PageScrollTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&LoginUserTool&] &&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&loginuser&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&pany.util.velocity.LoginUserTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&MenuTool&] &&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&menuviewer&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&pany.util.velocity.MenuTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&FileSystemTool&] &&
&&&&&&&& &&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&filesys&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&class&pany.util.velocity.contrib.FileSystemTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&ExceptionTool&]&&&&&&&& &&
&&&&&&&& &&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&exception&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&pany.util.velocity.ExceptionTool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&POITool&]&&&&&&&&&&&&&& &&
&&&&&&&&使用自己写的操作Excel的类 &&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&poi&/key& &&
&&&&&&&&&scope&request&/scope& &&
&&&&&&&&&class&pany.util.velocity.POITool&/class& &&
&&&&&/tool& &&
&&&&&!--&[&ConstantTool&] &&
&&&&&&&&使用自己定义的常量。 &&
&&&&--& &&
&&&&&tool& &&
&&&&&&&&&key&constant&/key& &&
&&&&&&&&&scope&application&/scope& &&
&&&&&&&&&class&pany.Constant&/class& &&
&&&&&/tool& &&
&/toolbox&&&
TA的最新馆藏

我要回帖

更多关于 velocity tools 的文章

 

随机推荐