An example of what you can do
tiles-def.xml (.main.home defines menus and other things, and extends layout.jsp):
<definition name=".main.search.list" extends=".main.home">
<put name="titleKey" value="Search list" />
<put name="body" value="/WEB-INF/jsp/tiles/searchlist.jsp" />
</definition>
I put the title in my layout template:
layout.jsp (using JSP 2.0/JSTL/EL - you may have to set resource name to be the same as the one Struts uses):
...
<head>
<tiles:importAttribute scope="request"/>
<title> <fmt:message key="${titleKey}"></title>
or using struts tags, layout.jsp: ... <head> <tiles:importAttribute scope="request"/> <title> <bean:message name="titleKey"></title>
or a mixture of struts tags and EL (requires html-el struts tags), layout.jsp:
...
<head>
<tiles:importAttribute scope="request"/>
<title> <bean:message key="${titleKey}"></title>
The tiles:importAttribute is pulling all the values into request scope so that I can use them on this page and other tiles pages.
You Xu wrote:
I saw your reply as follows:
<title><tiles:getAsString name="title"/></title>
<tiles:insert blah> <tiles:put name="title" value="Duh Title O' Dis Page Here"/> </tiles:insert>
But what do you put in the xml definition file? The problem is that you can not use <tiles:getString...> in the JSP page and put <bean:message ... > in the xml file for the value of that title string. It won't work.
---------------------------------
Do you Yahoo!?
All your favorites on one personal page – Try My Yahoo!
-- Jason Lea
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]