类 ViewContextTool
java.lang.Object
org.apache.velocity.tools.generic.SafeConfig
org.apache.velocity.tools.generic.ContextTool
org.apache.velocity.tools.view.ViewContextTool
- 所有已实现的接口:
Serializable
Extension of ContextTool that includes keys and values
from the HttpServletRequest, HttpSession and
ServletContext.
Template example(s):
#foreach( $key in $context.keys )
$key = $context.get($key)
#end
Toolbox configuration:
<tools>
<toolbox scope="request">
<tool class="org.apache.velocity.tools.view.ViewContextTool"/>
</toolbox>
</tools>
This class is only designed for use as a request-scope VelocityView tool.
- 从以下版本开始:
- VelocityTools 2.0
- 版本:
- $Id: ViewContextTool.java 385122 2006-03-11 18:37:42Z nbubna $
- 作者:
- Nathan Bubna
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明protected jakarta.servlet.ServletContextprotected jakarta.servlet.http.HttpServletRequestprotected jakarta.servlet.http.HttpSession从类继承的字段 org.apache.velocity.tools.generic.ContextTool
context, toolbox从类继承的字段 org.apache.velocity.tools.generic.SafeConfig
LOCK_CONFIG_KEY, log, LOGGER_NAME_KEY, SAFE_MODE_KEY, USE_CLASS_LOGGER_KEY -
构造器概要
构造器 -
方法概要
从类继承的方法 org.apache.velocity.tools.generic.ContextTool
contains, get, getKeys, getThis, getToolbox, getValues从类继承的方法 org.apache.velocity.tools.generic.SafeConfig
configure, getLog, initLogger, isConfigLocked, isSafeMode, setLockConfig, setSafeMode
-
字段详细资料
-
request
protected jakarta.servlet.http.HttpServletRequest request -
session
protected jakarta.servlet.http.HttpSession session -
application
protected jakarta.servlet.ServletContext application
-
-
构造器详细资料
-
ViewContextTool
public ViewContextTool()
-
-
方法详细资料
-
configure
- 覆盖:
configure在类中ContextTool
-
fillKeyset
- 覆盖:
fillKeyset在类中ContextTool
-