A toolbox manager for the servlet environment.
A toolbox manager is responsible for automatically filling the Velocity context with a set of view tools. This class provides the following features:
Configuration
The toolbox manager is configured through an XML-based configuration file. The configuration file is passed to the {@link #load(java.io.InputStream input)}method. The format is shown in the following example:
<?xml version="1.0"?> <toolbox> <tool> <key>link</key> <scope>request</scope> <class>org.apache.velocity.tools.view.tools.LinkTool</class> </tool> <tool> <key>date</key> <scope>application</scope> <class>org.apache.velocity.tools.generic.DateTool</class> </tool> <data type="number"> <key>luckynumber</key> <value>1.37</value> </data> <data type="string"> <key>greeting</key> <value>Hello World!</value> </data> <xhtml>true</xhtml> </toolbox>
The recommended location for the configuration file is the WEB-INF directory of the web application.
@author Gabriel Sidler @author Nathan Bubna @author Geir Magnusson Jr. @author Henning P. Schmiedehausen @version $Id: ServletToolboxManager.java 534682 2007-05-03 01:50:54Z nbubna $ @deprecated Use {@link org.apache.velocity.tools.config.XmlFactoryConfiguration}
|
|
|
|