struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <ted.hus...@gmail.com>
Subject Re: How to splite the the sturts application into modules
Date Thu, 20 Apr 2006 12:07:44 GMT
On 4/20/06, Vimal Varghese <vimalmap@gmail.com> wrote:
> Can someone suggest a site for struts modulisation, with a small example.

The "Examples" application that is bundled with the Struts 1.2.9
distribution uses modules. Orginally, each module was a separate
example application. When modules came out, we bundled them into one.

* http://struts.apache.org/struts-action/learning.html#Examples

* http://struts.apache.org/struts-action/userGuide/configuration.html#dd_config_modules

The module feature works well, but a simplier alternative can be to
use multiple configuration files. The modules automatically insert a
prefix for you, to avoid action name collissions. But, if you can
manage your own prefixes, multiple configurations works as well.

To use multiple configuration files, simply specify more than one file
in the web.xml.

   <init-param>
        <param-name>config</param-name>
        <param-value>
         /WEB-INF/struts-config.xml, /WEB-INF/struts-config-2.xml,
/WEB-INF/struts-config-3.xml
        </param-value>
    </init-param>

HTH, Ted.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message