Re: How to use DataSrouceLoader in a non web application

2007-08-06 Thread Nathan Bubna
You can manually create an instance of DataSourceResourceLoader, set the DataSource on it directly using the setDataSource() method, and then directly inject that instance into your VelocityEngine by doing something like: DataSourceResourceLoader dsrl = new DataSourceResourceLoader(); dsrl.setData

Re: javax.servlet.jsp.JspException: Error initializing Velocity: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'menu.vm'

2007-08-06 Thread Nathan Bubna
The FileResourceLoader is notoriously difficult to configure property in a webapp environment, and is impossible to use in a webapp run as an unexploded WAR file. I recommend looking into the WebappLoader that is part of the VelocityTools project. You can see the VelocityTools javadoc or search t

Re: javax.servlet.jsp.JspException: Error initializing Velocity: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'menu.vm'

2007-08-06 Thread nageshyakkanti
I am using an exploded war file in this. Nathan Bubna wrote: > > The FileResourceLoader is notoriously difficult to configure property > in a webapp environment, and is impossible to use in a webapp run as > an unexploded WAR file. > > I recommend looking into the WebappLoader that is part of

Re: javax.servlet.jsp.JspException: Error initializing Velocity: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'menu.vm'

2007-08-06 Thread Nathan Bubna
Ok, that makes it possible to configure the FileResourceLoader properly, but it is still very difficult, non-portable, and generally not recommended. I strongly recommend you use the WebappLoader for resource loading in webapps. If you insist on using the FileResourceLoader, then you will find th

Re: javax.servlet.jsp.JspException: Error initializing Velocity: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'menu.vm'

2007-08-06 Thread Christopher Townson
>>> On 8/2/07, nageshyakkanti <[EMAIL PROTECTED]> wrote: Hi, >>> [snip] >>> my velocity.properties is as follows resource.loader = classpath >>> file.resource.loader.description = File Resource Loader >>> file.resource.loader.class = >>> org.apache.velocity.runtime.resource.loader.FileResourceLo

Re: javax.servlet.jsp.JspException: Error initializing Velocity: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'menu.vm'

2007-08-06 Thread nageshyakkanti
Yes, make sense I will try WebappResourceLoader and hopefully will work Christopher Townson-3 wrote: > On 8/2/07, nageshyakkanti <[EMAIL PROTECTED]> wrote: Hi, > [snip] my velocity.properties is as follows resource.loader = classpath file.resource.loader.description =