views:

7

answers:

0

Hi!

I'm using struts2+tiles2, and I would like to do the following. I have a baseLayout, where I define my menu, body, etc like this:

<tiles:insertAttribute name="menu" />
<tiles:insertAttribute name="body" />

And then in my tiles.xml I set them like this:

<definition name="/index" extends="baseLayout">    
    <put-attribute name="title" value="/public/menu.jsp" />
    <put-attribute name="body" value="/public/index.jsp" />
</definition>

So, some times I have more complex layouts where I can use several jsp in the body, and some of this jsp have some inline scripts. I would like to know if there is any way I can set all these inline scripts to be appended on the same place. So for example, I would like to define the page head in the baseLayout, and then have all the inline scripts appended to this head. I hope there is a way to do this, but I find the tiles documentation very confusing and I haven't discovered a way to do this.

Thanks!