You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Matt Raible <ma...@raibledesigns.com> on 2003/10/01 08:53:01 UTC

RE: Mixing jsp content with tiles using tiles tool

I've mixed Tiles and Velocity by creating a tag library that can render
velocity templates:

<mytag:content path="/path/to/template/"/>

Seems to work fairly well.

Matt

-----Original Message-----
From: Payne, Matthew [mailto:payne@Telerx.com] 
Sent: Monday, September 29, 2003 10:42 AM
To: 'velocity-user@jakarta.apache.org'
Subject: Mixing jsp content with tiles using tiles tool



I would like the mix jsp rendered content with velocity rendered content
via struts/tiles.  
Is this a possiblity.
 
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.

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

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

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.

Is the following a possibly?

<definition name="Vtest"
	            path="/TableBased.vm">
		<put name="header"
		     value="/header.jsp"/>
		<put name="footer"
		     value="/footer.jsp"/>
		<put name="body"
		     value="/center/listThemes.vm"/>
		<put name="rail"
		     value="/rail.jsp"/>
	</definition>

In TableBased, I include my content by -->$tiles.header or $tiles.body

If anyone been able to get this to work, let me know.

Matthew Payne



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