velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nat...@esha.com>
Subject Re: Mixing jsp content with tiles using tiles tool
Date Wed, 01 Oct 2003 16:06:51 GMT
Payne, Matthew said:
> I would like the mix jsp rendered content with velocity rendered content via
> struts/tiles.
> Is this a possiblity.

i think rendering Velocity amidst JSP is feasible, but rendering JSP amidst
Velocity is almost certainly not.

> Tiles seem to work well when a definition is all jsp or a definition is all
> velocity. However, mixing the two does not work well at all.

no surprise there.  they're two very different things that are typically
rendered by different servlets.  so rendering both during the same request is
definitely atypical and will likely take a bit of work.

Matt Raible has apparently developed a JSP tag for rendering Velocity.
there's also the Veltag (http://jakarta.apache.org/velocity/veltag.html).

as for getting the VelocityTools to work within Veltag, there has been some
discussion on this in the past
(http://marc.theaimsgroup.com/?l=velocity-user&m=105043871819828&w=2).

> If a definition is based on a jsp layout, just an exeption page is returned.

of course, JSP is not designed to render Velocity,

> If a definition is based on a velocity layout, no exceptions are thrown, but
> the jsp content is included as "source", and is not executed(not good).

and Velocity is not designed to render JSP.

> One important thing to note is that mixing velocity in a jsp layout works
> perfectly on Resin(not tomcat). I have not tried doing it the other way
> around.
...

i'm not surprised you have some success mixing in velocity syntax on Resin,
but i would be surprised if VelocityTools was working there.

http://www.caucho.com/resin/ref/velocity.xtp

anyway, i'm no Tiles expert, but as far as i know, it won't do the rendering
for you, and neither Jasper (Tomcat's JSP thingy) nor the VelocityViewServlet
can render mixed JSP and Velocity without using something like the Veltag.

Nathan Bubna
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message