On Thu, 18 Sep 2003, Manish Singla wrote: > Date: Thu, 18 Sep 2003 20:51:59 -0600 > From: Manish Singla <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Multiple modules > > What are the advantages of having multiple struts-config modules defined in > web.xml vs comma separated struts-config.xml from design point of view. >
In my opinion, the largest single difference between the approaches is really "namespace collisions". Consider what happens if two different struts-config.xml files (developed by two independent teams of developers working on portions of your overall application) both try to define an <action> named "/foo", or a global <forward> named "success": * If you are using a single module (one config file or multiple config files isn't relevant -- internally they are all combined into a single set of config entries), the last definition wins -- so someone's code doesn't work correctly unless the identifier is changed. * If you are using multiple modules, each module has its own namespace for actions, forwards, and so on -- so the fact that they share the same identifier doesn't matter. So, multiple modules gives you some protection against this problem, at the (slight) cost that it's a little funky to switch between modules. > I am ok with slight overhead of multiple struts-config file (in web.xml > approach). > I agree that any overhead difference here wouldn't matter (it all happens only once, before the first user request is processed). However, because modules are going to need separate config files anyway, any difference here is vanishingly small. Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

