velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <>
Subject Re: velocity & jwaa
Date Sat, 14 Jul 2001 02:40:39 GMT
Tal Dayan wrote:
> As a naive user that just unzipped the Velocity distribution, I would expect
> Velocity.getTemplate(String name ... ) to treat 'name' (also) as a
> standard file path (both relative or absolute).

I see.

> The template is in a file and a file path is a common notation to refer
> to files in the OS.

Except that templates aren't always in a file.  They can be in a jar and
loaded by the classloader in a webapp, or in a database, or even just a
String or a stream.

I certainly understand your argument, and I think that a compromise
would be making sure that the example apps are foolproof with good
documentation, and the things to watch out for are well documented.

That way a bare newbie can start to play with it w/o much stress. 
That's really the key I think - once you get a handle on it, it's ok,
> This does not mean that Velocity should not support other template sources
> or loaders
> but it will be nice to have this as a default behavior in an out-of-the-box
> configuration.

The problem is that there is really no such thing as an out-of-the-box
configuration - it's a library, so you have to write an application
around it.

I think the key is even better examples.

Maybe I will put in another example servlet, where you can specify the
name of the template in the URL, so new users can just drop it into a
webapp and start....
> Also, if Velocity does not find a template, a detailed message where it
> looked for it and a
> hint how to configure the search domain will be helpful for newbies like us.

Brad thinks so too :)  We can make the log output better, and note in
the docs a troubleshooting strategy.


Geir Magnusson Jr.                 
System and Software Consulting
Developing for the web?  See
You have a genius for suggesting things I've come a cropper with!

View raw message