Tiles and multiple modules


The application seen earlier used Tiles in a single application module. In this section you will see Tiles works across modules. Tiles provides two modes of operation: Non-module-aware and module-aware modes. They are distinguished by the setting moduleAware attribute on the Tiles PlugIn. The definition file is specified by the definitions-config attribute on the Tiles PlugIn.

In non-module-aware mode, all modules use the same tiles definition file specified in the struts-config.xml for the default module. If there is no default module, all modules use the tiles definition file specified in the struts-config.xml for the first module listed in web.xml.

In module-aware mode, each module has its own tiles definition file. A module cannot see definitions in a tiles definition file belonging to another module unless it uses that file itself.




Struts Survival Guide. Basics to Best Practices
Struts Survival Guide: Basics to Best Practices (J2ee Survival Series)
ISBN: 0974848808
EAN: 2147483647
Year: 2004
Pages: 96

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net