Have you seen http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html ?
Struts 2 is intentionally mostly ignorant of Tiles, except for the plugin, so something like per-package tiles defs would involve writing your own code, perhaps a custom subclass of the TilesResult. However, if you just want to spread out your config among multiple files (which I like to do), you just need to specify a context parameter like this: <context-param> <param-name>org.apache.tiles.DEFINITIONS_CONFIG</param-name> <param-value> /config/tiles/common.xml, /config/tiles/create.xml, /config/tiles/library.xml, /config/tiles/profile.xml, /config/tiles/login.xml </param-value> </context-param> While I think Tiles 2 is probably reasonably close to a release, it is still under development, and documentation is one thing that is needed. (Contributions are always welcome...) It doesn't have much traffic yet, but there is now a tiles user mailing list -- see http://tiles.apache.org/mail-lists.html In the mean time, remember that it hasn't been released, so if you plan to use it, you should probably subscribe to the [EMAIL PROTECTED] mailing list to keep up with status and changes. Joe On 1/29/07, Gonçalo Luiz <[EMAIL PROTECTED]> wrote:
Hello, I'm developing a web application using struts2. I'm a struts1 developer and now I'm migrating myself (not a specific app) to struts2. The documentation is very good so I managed to setup struts and run a few actions. The problem I found was in what it regards to Tiles. Despite the documentation refers the web.xml (the interceptor and configuration file) and struts.xml (return types) it does not show a tiles-configuration.xml example. I was used to have a tiles-configuration.xml for each subapplication (STRUTS2's namespace) and now it seems that there can be only one. I'm good with that, but I'd like to know the tiles-configuration.xml format. So, what I'd like to know is: 1 - is there any way to specify multiple tiles-configuration.xml files? 2 - is there any way to associate a different tiles-configuration.xml file to each package 3 - is there an example of a tiles-configuration.xml usage with struts2? 4 - is tiles1 or tiles2 which comes bundled with struts2? Where can I find this info in documentation. Oh, planetstruts.org is down for at least 3 days, where can I report this? Best Regards, -- Gonçalo Luiz --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Joe Germuska [EMAIL PROTECTED] * http://blog.germuska.com "The truth is that we learned from João forever to be out of tune." -- Caetano Veloso