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>
LOG
Constructor and Description |
---|
ServletToolInfo()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsRequestPath(String requestedPath)
Deprecated.
|
String |
getRequestPath()
Deprecated.
|
String |
getScope()
Deprecated.
|
void |
setRequestPath(String path)
Deprecated.
|
void |
setScope(String scope)
Deprecated.
|
getApplicationClass, getClassname, getInstance, getKey, getParameters, setClassname, setKey, setParameter, setParameters
public void setScope(String scope)
public String getScope()
public void setRequestPath(String path)
path
- the full or partial request path restriction of the toolpublic String getRequestPath()
public boolean allowsRequestPath(String requestedPath)
requestedPath
- the path of the current servlet requesttrue
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
.Copyright © 2002–2016 Apache Software Foundation. All rights reserved.