tags:

views:

10

answers:

0

I am making changes to an existing web app project which currently has web pages for ONE LAYOUT, say, for example, BLACK.

My layout blackpage1.jsp is made up by assembling Struts Tiles - title, header, footer. My current layout blackpage1.jsp looks like:

tiles:insert title

tiles:insert header

tiles:insert footer

I would like to change my blackpage1.jsp to

if X == Red {

  tiles:insert red-title

  tiles:insert red-header

  tiles:insert red-footer

 }

else if X == Black {

  tiles:insert black-title

  tiles:insert black-header

  tiles:insert black-footer

 }

How do I achieve this?

Is it possible to add the if condition to tiles-defs.xml itself, instead of adding to blackpage1.jsp?