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.


Thanks.


Nathan Bubna wrote:
> First, make sure that the import tool is in the context:
>
> $import.class.name
>
> if that renders as "$import.class.name", then the ImportTool is not
> available. Let us know if that's the case, and we'll help you get that
> running first.
>
> If it is available, then there is a problem reading the url.  In that
> case, there should be a message about it in your log file.
>
> On 9/28/06, Tod Thomas <[EMAIL PROTECTED]> wrote:
>> I am trying to implement a web application under Tomcat that uses JSP's
>> originally created for another application.  The other application's
>> JSP's are in the /html directory under its document root.
>>
>> Can I use the ImportTools $import.read("OtherDocRoot/html/legacy.jsp")
>> to bring in the contents of legacy.jsp in my velocity template?  I've
>> tried it and it isn't working.
>>
>> Tomcat seems to be loading the VelocityViewServlet correctly but when
>> rendering the velocity based page I only see:
>>
>> $import.read("OtherDocRoot/html/legacy.jsp")
>>
>> instead of it bringing in the JSP and rendering its contents correctly.
>>
>> Any hints on the best way to debug this?
>>
>>
>> Thanks - Tod
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

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



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

Reply via email to