Hi Subbiah,

> My generic question on VELOCITY is this.
> 1.  I see velocity very similar to adding sessions in servlets and accessing
> them  in the jsp pages. Is this correct ?

In a way, yes.  In Velocity, you put stuff in the Context, and then you
can access them from the template.  In addition to that you have access
to some easy-to-use directives.  :)
    http://jakarta.apache.org/velocity/user-guide.html#Directives

> 2. I am using VELOCITY to generate templates for certain messages that will
> be filled at run time. The input is XML and output is any file. We use
> velocity because, the client can change the template anytime his fomat
> changes, but after using velocity [I might be wrong] I feel he still has to
> know the details of the object or java classes to use velocity , for example
> I use DOM parser, then the client has to know what methods are there to make
> a change in the template.This is like changing the source code of the
> generator one thing he need do is rebuild.
> 
> Is this the advantage that velocity provides or are that more that my short
> sightedness prevenst me from seeing [I am sure there are]

VTL itself is a very simple language.  The problem here is that you
aren't being friendly to the template designers (the client).  If you
put the DOM document itself in the Context, the template designers will
have to know how to use DOM.  But if you extract all the data needed in
java, and put them in the Context in a more user-friendly fashion (like
custom JavaBeans), the only things the template designers need to know
are the reference names of the information plus maybe some custom
methods for doing special things.

Good luck with Velocity!  ;)

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai <[EMAIL PROTECTED] >




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to