You can put springs message key to tiles title attribute.
Up vote 0 down vote favorite 2 share g+ share fb share tw.
I have a project setup using Spring 3, Apache Tiles 2 and Maven. Before I implement Tiles I was using the messages. Properties file to dynamically populate the titles for a webpage (The part that appears between the head and title tags).
The reason for this was to allow localization in the future. However since I've integrated tiles, the tiles. Xml file seems to control the titles for my page.
Is there a way to change this so the page title comes from messages. Properties for each jsp I use as the body of a page? Tiles.
Xml is: Where you see "Welcome from Tile" or "New Deal" as the title I would rather that this message comes from a messages.properties. I've tried putting the message in the title tags on the "body" page to no avail. The project is setup on GitHub, you can take a look at this URL: Group-Deal-Clone java apache spring tiles link|improve this question asked Aug 4 '11 at 7:39Ali2,482316 95% accept rate.
You can put springs message key to tiles title attribute. And use it in jsp something like this I don't have right now tiles + spring project on hands so I can't check is syntax 100% correct but I have use this approach before. And of course you could do something like this to get per page title.
Thanks for your reponse but your approach won't work for a simple reason that tiles inserts header information separately. Using this approach results in 2 and tags on the page. What I need is for some way to replace the tile attribute title value in the JSP or to dynamically define it in the tiles.xml.
– Ali Aug 4 '11 at 11:36 Sorry, you are absolutely correct, my mistake was that I was concentrating on the jsp for the body where as the code you gave me works when put in the layout jsp. – Ali Aug 4 '11 at 11:42.
Another variant, without c:set: in tiles-defs. Xml: ... in base. Jsp: in messages.
Properties: home. Title=Homepage title.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.