类 ViewContextTool

所有已实现的接口:
Serializable

public class ViewContextTool extends ContextTool

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
另请参阅:
  • 字段详细资料

    • request

      protected jakarta.servlet.http.HttpServletRequest request
    • session

      protected jakarta.servlet.http.HttpSession session
    • application

      protected jakarta.servlet.ServletContext application
  • 构造器详细资料

    • ViewContextTool

      public ViewContextTool()
  • 方法详细资料