Nathan,

Nathan Bubna wrote:
If you are asking whether you can embed JSP markup within a Velocity
template, then the answer is definitely no.  though, there have been
some efforts to use tags within templates though:  WebWork used to
support using JSP taglibs with templates, though not using the JSP
markup (i'm not sure about Struts 2 still has this, but it may since
it used to be WebWork).

FYI S2 provides its own "tag api" which is available separately through JSP, FreeMarker, and Velocity. Their tags actually use FreeMarker behind the scenes to generate the output.

This doesn't really allow you to "use" JSP markup (for example) within a Velocity (or FreeMarker) template... it just lets you choose your rendering technology and provides a consistent interface across all three.

As Nathan suggests, you can easily add an instance of an object to the Velocity "context" (roughly analogous to the "page" context in the JSP environment) through a variety of mechanisms. The JSP tag library itself will be worthless to Velocity, unfortunately, because it is to tied to the JSP environment.

Hope that helps,
-chris

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to