velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Payne, Matthew" <pa...@Telerx.com>
Subject RE: Mixing jsp content with tiles using tiles tool
Date Wed, 01 Oct 2003 17:04:51 GMT


Re: 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.

I guess I thought each tiles definition would be dispatched to the correct
rendering engine depending on its association(.vm, .jsp, .ftl. Etc)

Seems like the top level definitions are dispatched correctly, but "put"
(child) contents are bound to the parent type?

i.e. 

Can't do 

<definition name="jsplayout"
	            path="/layout.jsp">
		<put name="header"
		     value="/header.ftl"/>
		<put name="footer"
		     value="/footer.jsp"/>
		<put name="body"
		     value="/center/listThemes.vm"/>
		<put name="rail"
		     value="/rail.xtp"/>
</definition>

Matt


-----Original Message-----
From: Nathan Bubna [mailto:nathan@esha.com] 
Sent: Wednesday, October 01, 2003 12:07 PM
To: Velocity Users List
Subject: Re: Mixing jsp content with tiles using tiles tool


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).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.

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



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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message