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
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
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
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
>>> 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
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 =