Nathan Bubna wrote:
On 12/12/06, Tod Thomas <[EMAIL PROTECTED]> wrote:
Ok, I'm back looking at this.  I can see Velocity loading in
Catalina.out yet I still have a problem with ImportTool.

I tried (literally) adding $import.class.name to my .vm file and it does
return "$import.class.name".  I also tried
$import.read("http://localhost/test.html";) which returned
"$import.read("http://localhost/test.html";)".

if "$import.class.name" is the output you get for $import.class.name,
then that means the Import tool is not available in the context.  In
other words, your toolbox probably is not loaded.

While firing up tomcat I do see "Unable to read Velocity configuration
file: java.lang.NullPointerException" but I don't mind using the default
configuration right now.

That's not good, but the Velocity config is different than the toolbox
config, so that shouldn't cause our current problem.

I also see this:

18:58:03,284 INFO  [[/]:646]  Velocity  [error] ResourceManager : unable
to find resource 'VM_global_library.vm' in any resource loader.
18:58:03,291 INFO  [[/]:646]  Velocity   [info] Velocimacro : error
using  VM library template VM_global_library.vm :
org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'VM_global_library.vm'

Could this be the problem?

No, that's normal and is just overzealous "error" reporting that is
fixed in Velocity 1.5-beta2.

I ultimately see:

18:58:03,314 INFO  [[/]:646]  Velocity   [info] Velocity successfully
started.
18:58:03,395 INFO  [[/]:646]  Velocity   [info] VelocityViewServlet:
Default content-type is: text/html

So I expect Velocity started ok.  Any ideas?

Is there anything in the logs about a "toolbox"?  Do you have a
toolbox.xml set up to be used?  See
http://jakarta.apache.org/velocity/tools/view/  for more on this.


Nothing toolbox related in the logs.  My ./WEB-INF/toolbox.xml has:

<?xml version="1.0"?>
<toolbox>
 <tool>
  <key>import</key>
  <scope>request</scope>
  <class>org.apache.velocity.tools.view.tools.ImportTool</class>
 </tool>
</toolbox>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to