thanx Simon for taking out time to help me Simon Christian <[EMAIL PROTECTED]> wrote:Ok, in that case the answer to your original question is essentially no, there's no way to do what you're asking in a single pass.
The optimal way to do it would be to use a single context. If the first template might make changes to the second template, wrap the single context in an individual one per template. Then, if you're going to be using the same templates more than once in the application run, it will be much more efficient to use mergeTemplate than evaluate, as the former uses caching. hth, - simon Gagan 007 wrote: > Simon, > Thanx for ur reply > Let me try again to explain my need > > 1. I have two different Velocity Templates... > 2. The Vecloity variables are same in both the templates. > 3. Now i need to call Velocity.evaluate twice, to merge the context with the > templates > 4. What i m looking for is a way in which i am able to pass both the > templates together with the same context, and two different outputs (one for > each template) > > i hope i m clear this time > > > Simon Christian wrote: > Hi Gagan, > > Well it depends what you're asking: do you need to merge two separate > templates into two separate outputs? If so then there really isn't a > useful way to do this any easier. However, if you need to include the > two templates into one output then it's easy, just use #parse() - see > the manual for how to use it. > > - simon > > > Gagan 007 wrote: > >>Hi >>I have populated the VeclocityContext and i have to merge with two >>templates.... >> >>i need to call Velocity.evaluate twice for that... >> >>To improve the performace is there any way so that i m able to do this in one >>single call >> >>- Thanx >> >> >> >> >> >> >>--------------------------------- >>Do you Yahoo!? >>Yahoo! Small Business - Try our new resources site! > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site!