1

I've created a global.properties file containing several key-value pairs. It works very well all around my struts2 project. I use tiles plugin with struts.

I just want to use a properties file key in tiles.xml. I've tried something like <put-attribute name="title" value="${global.reg}'"/> but it didn't work. But still the title shows ${global.reg}.

How can I use property file values in my Tiles configuration?

Dave Newton
  • 158,873
  • 26
  • 254
  • 302
Deepesh
  • 57
  • 8
  • see this thread http://stackoverflow.com/questions/7600033/is-it-possible-to-have-dynamic-values-in-tiles-xml-in-struts2 it might give you some idea – Umesh Awasthi Mar 23 '12 at 06:38
  • I'm not sure this is doable with "stock" Tiles, but the mechanism it uses to fill in values is relatively easy to extend--it should be possible to hook in to the Tiles init process to load the property file and expose those properties to Tiles. You might consider asking on the Tiles mailing list for the quickest response; I don't know how active they are on SO. If you get an answer there, make sure to follow up by posting your own answer here if nobody else does. – Dave Newton Mar 23 '12 at 12:03
  • refer this link http://stackoverflow.com/questions/1552094/struts-2-tiles-2-dynamic-title – MohanaRao SV Mar 24 '12 at 16:04

0 Answers0