Hello,
I'm using The VelocityTools 1.4 and the VelocityViewServlet. My
templates render fine, except for the fact that I can't get any tools to
work. Here is my toolbox.xml:
<?xml version="1.0" encoding="UTF-8"?>
<tools>
<toolbox scope="application">
<tool class="org.apache.velocity.tools.generic.DateTool"
format="yyyy-MM-dd"/>
</toolbox>
<data key="foo" value="this is foo."/>
</tools>
And here is the template I'm using:
<html>
<body>
<p>$request.requestURI</p>
<p>$date</p>
<p>$foo</p>
</body>
</html>
When this template is rendered, the requestURI gets expanded just fine,
but I actually see '$date' and '$foo' for the tool variables, instead of
their expanded values. Logging shows that Velocity is indeed reading my
toolbox.xml file, so I don't know where I've screwed up:
2009-02-05 16:21:39,884 INFO
[org.apache.velocity.tools.view.servlet.ServletToolboxManager] Using
config file '/WEB-INF/toolbox.xml'
2009-02-05 16:21:39,887 TRACE
[org.apache.velocity.tools.view.XMLToolboxManager] Loading toolbox...
2009-02-05 16:21:39,924 TRACE
[org.apache.velocity.tools.view.XMLToolboxManager] Toolbox loaded.
2009-02-05 16:21:39,929 DEBUG
[org.apache.velocity.tools.view.servlet.ServletToolboxManager] Toolbox
setup complete.
I'm using Maven2 to build the project, and have made sure to package all
dependencies with my WAR, listed here:
http://velocity.apache.org/tools/devel/dependencies.html
Any help is appreciated, thanks!
-David
---------------------------------------------------------------------------------------------------------------------
Please consider the environment before printing this email or
its attachments
---------------------------------------------------------------------------------------------------------------------
Note: This message is only intended for the use of the individual or entity to
which it is addressed and may contain
information that is privileged, confidential and exempt from disclosure. If the
reader of this message is not the
intended recipient, or an employee or agent responsible for delivering the
message to the intended recipient, you are
hereby notified that any dissemination, distribution, or copying of this
communication is strictly prohibited. If you
have received this communication in error, please notify us by telephone
(604-888-2079) or electronically by return
message, and delete or destroy all copies of this communication. Thank you.
(OFG_File#163)
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]