I use Apache tiles for templates, and part of the template is the title text. This text depends on the section to which the page belongs. Each page contains a bean, and the header text is built using the properties of this bean. bean will have a different name for each page. So, in my JSP file, I would have something like this:
<div>${myBean.id} - ${myBean.name}</div>
I want to get this expression in a fragment definition, and I tried this:
<definition template="/WEB-INF/tiles/layout/mytemplate.jsp">
<put-attribute name="title" expression="${myBean.id} - ${myBean.name}" />
</definition>
And in the template, I do:
<div class="title-header"><tiles:insertAttribute name="title" /></div>
But the result is a raw EL expression:
<div>${myBean.id} - ${myBean.name}</div>
The code has been simplified here to keep this post concise, but this is exactly what I'm trying to do. There are also reasons why I am trying to do it this way.
Any idea why the EL expression is not being processed?
thank
. JSP Apache Tiles, , , .