velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson" <>
Subject RE: Veltag with struts tools
Date Thu, 05 Jun 2003 19:26:32 GMT
Bart -

I'm sure Nathan will chime in, but I think this will be going against
the grain.

Veltag is a way to inject bits of VelocityTemplate into a JSP page. The
tag instantiates a velocity engine and 'borrows' the request/session/app
to use as a VelocityContext. 

VelocityView and StrutsTools aim to use VelocityTemplates directly with
Struts - no JSP involved. The Velocity view knows how to render *.vm
files and the Struts Tools provide the glue to make the Struts objects

Take a gander at this pretty diagram:

I think it sounds like what you want is to have a VelocityTemplate that
understands JSP Taglibs.

Ex. foo.vm
Howdy I am a $Velocity template
<bart:table_tag table="USERTABLE">

I predict the probability of this being coded at <0.00000001, or less.

For this to work, the Velocity engine would have to understand that the
bart:table_tag was a JSP tag and then somehow use JASPER.JAR to process

My two cents - Keep the JSPs for now and slowly migrate to *.vm files
where it makes sense.

Both can be used in the same application simultaneously, just change the
Struts forward mapping from foo.jsp to foo.vm.

I have often found that the Custom Tag functionality can be done easier
using Velocity Macros, but of course your mileage may vary. :-)

Cheers Timo

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message