[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-dev
Subject:    Re: WebAppLoader Doc/Example
From:       Nathan Bubna <nathan () esha ! com>
Date:       2004-02-25 23:12:52
Message-ID: 03c701c3fbf4$e595d620$6505a8c0 () zeus ! esha ! com
[Download RAW message or body]

Tim Colson said:
> Hey folks -
>   Just some anecdotal info - I've seen a few questions on using Velocity
> (off this list) where folks have servlet code that uses the
> FileResourceLoader. I usually tell them they ought to just map *.vm to
> the VelocityViewServlet, and be happy. This seems to make them too
> nervous. Maybe they can't mentally handle the separation that implies.

is there a word for "fear of simplicity"?

> Next best option I figure is to recommend using the WebAppLoader - but
> although it's used in the VVS, the only docs are Javadoc and they are
> daunting despite claims of being "easier".
>
> http://jakarta.apache.org/velocity/developer-guide.html#Configuring%20Re
> source%20Loaders
>
> The Dev Guide has docs and configuration examples for FileResourceLoader
> but not WebApp, and Example2 shows plainly how to use Velocity (in a
> non-servlet app).
>
> Using these two seems to be the path most of these folks take, but for
> servlets. :-(
>
> Howabout adding a mention in the Velocity Dev Guide for the WebApp
> ResourceLoader?

i think this would be good.  get people used to the idea that explicitly
velocity/webapp related code is being handled by VelocityTools now (e.g. the
deprecation of VelocityServlet), but still give them pointers in the right
direction.

> And maybe a prototypical way to setup/use that loader in the Vel Tools
> docs?

i'm always happy to accept patches for the VelocityTools docs! :)  also, it
might be worthwhile to mention when you *would* want to use FileResourceLoader
for a Velocity webapp (e.g. when you need modificationCheckInterval to work).

> Thoughts?
>
> Come to think of it... maybe I can create a pretty diagram (like the
> struts one) and quick docs to show how NOT to write any Velocity code at
> all.... just map *.vm to VelocityViewServlet, stick stuff into the
> request object and be happy! :-)

sounds good to me. :)

Nathan Bubna
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic