类 ServletToolInfo

java.lang.Object
org.apache.velocity.tools.view.ViewToolInfo
org.apache.velocity.tools.view.servlet.ServletToolInfo
所有已实现的接口:
ToolInfo

@Deprecated public class ServletToolInfo extends ViewToolInfo
已过时。

ToolInfo implementation that holds scope information for tools used in a servlet environment. The ServletToolboxManager uses this to allow tool definitions to specify the scope/lifecycle of individual view tools.

Example of toolbox.xml definitions for servlet tools:

  <tool>
    <key>link</key>
    <scope>request</scope>
    <class>org.apache.velocity.tools.struts.StrutsLinkTool</class>
  </tool>
  <tool>
    <key>math</key>
    <scope>application</scope>
    <class>org.apache.velocity.tools.generic.MathTool</class>
  </tool>
  <tool>
    <key>user</key>
    <scope>session</scope>
    <class>com.mycompany.tools.MyUserTool</class>
  </tool>
  

版本:
$Id: ServletToolInfo.java 564438 2007-08-10 00:15:18Z nbubna $
作者:
Nathan Bubna
  • 字段详细资料

    • scope

      private String scope
      已过时。
    • exactPath

      private boolean exactPath
      已过时。
    • path

      private String path
      已过时。
  • 构造器详细资料

    • ServletToolInfo

      public ServletToolInfo()
      已过时。
  • 方法详细资料

    • setScope

      public void setScope(String scope)
      已过时。
    • getScope

      public String getScope()
      已过时。
      返回:
      the scope of the tool
    • setRequestPath

      public void setRequestPath(String path)
      已过时。
      参数:
      path - the full or partial request path restriction of the tool
      从以下版本开始:
      VelocityTools 1.3
    • getRequestPath

      public String getRequestPath()
      已过时。
      返回:
      request path restriction for this tool
      从以下版本开始:
      VelocityTools 1.3
    • allowsRequestPath

      public boolean allowsRequestPath(String requestedPath)
      已过时。
      参数:
      requestedPath - the path of the current servlet request
      返回:
      true if the path of the specified request path matches the request path of this tool. If there is no request path restriction for this tool, it will always return true.
      从以下版本开始:
      VelocityTools 1.3