Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Struts 2 and tiles

Sai Nay Thurein Nyo

2007-01-30

Replies:

Joe Germuska <joe <at> germuska.com> writes:

>
> 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


Hi Joe,

I am testing on the tiles 2 to use in my new framework using Struts 2.
I tried the following and it doesn't work.
The tiles keep looking for the /WEB-INF/tiles.xml file which is default.
All I need to do is simply add in the context parameter in web.xml right?

<context-param>
        <param-name>org.apache.tiles.DEFINITIONS_CONFIG</param-name>    
   
<param-value>/WEB-INF/tiles-common.xml,/WEB-INF/tiles-sample.xml</param-value>
  </context-param>

I did try a few other configurations with different params names such as
"definition-config, tiles-definiation" also didn't working.
Please enlighten me.

Thanks
Sai Nay Thurein Nyo


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.