struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Schäfer <Newslet...@ThorstenSchaefer.de>
Subject RE: [Tiles] How to get rid of redundant code
Date Fri, 07 Feb 2003 20:57:03 GMT
Hi,

This works great. Thanks for opening my eyes ;)

Thorsten


> > I'm using tiles with definitions and I've a lot of pages with the
same
> > structure. The problem is, that I need always two files for one
page: a
> > page for the structure and one for the content. These pages look
like
> > this:
> > samplePage:
> > <tiles:insert definition="common.layout">
> >   <tiles:put name="content"
value="/WEB-INF/jsp/samplePageContent.jsp"/>
> > </tiles:insert>
> > samplePageContent:
> > <h1>This is an example</h1>
> > Is it possible to put the content into the insert-tag?
> 
> Why not put sample.page into tiles-definition.xml?
> 
>  <definition name="sample.page" extends="common.layout">
>     <put name="content"     value="/WEB-INF/jsp/samplePageContent.jsp"
/>
>  </definition>
> 
> Then you don't have to have that third .jsp file.



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


Mime
View raw message