> -----Original Message-----
> From: Dan Bachelder [mailto:[EMAIL PROTECTED]]
>
> I'm rather new to the velocity scene...
>
> I was kind of wondering about how people design to use the
> velocity in their
> web apps?
>
> do you use a servlet to sit in front and serve all the pages? do
> you design
> modules based on like-content? do you use a page-centric view? or
> something
> completely different?
>
> discussion or resources are welcome... thanks.

I've found that mapping *.vm (or whatever extension you want) to a servlet
works pretty well.  Then use request.getServletPath() in handleRequest to
figure out which template to load.

This is extremely convenient when working with web designers, because then
you can add your document root to Velocitiy's path, and keep your .vm and
.gif and .jpg files all under the same directory.  Make sure you have
Apache/Tomcat configured properly, I've found that a sloppy config can
reveal your templates (not a big deal with all the logic in your servlets,
anyway.

-Dave

Reply via email to