> I've just started using Struts on something that will eventually > become a fairly large project. We were looking at using modules > to break things up, but I haven't actually tried it yet. > Can you explain how this config-behind-story approach compares > to using modules?
Using modules allows a greater degree of separation, i.e. decoupling, of actions. It also means that you can use the same action name in more than one place, calling a different action. > In my project, I want to avoid having huge config files, but I'd > like the application to treat all ActionForms and ActionMappings the > same way regardless of which config file they come from. Eventually, I > may want to re-use parts of the configuration in multiple web apps. > Would this approach be good for that, or would it make more sense to > look at setting up modules? Any tips would be appreciated. I was in the same boat a few months ago--or thought I was! I started trying to build with the multiple config file approach, but some pieces kept getting cluttered as actions were given more and more dynamic forwards. So I split it into modules, making things much cleaner and clearer. Each main menu in my app now corresponds to a module, which makes it MUCH easier to follow behind the scenes. BTW, note that you can use multiple config files for each module as well. So if you know there are common configuration items such as a welcome action, toss it in say struts-config-common.xml and add that to the module config line. Be careful of using plug-ins in the common file, though! Whatever gets loaded first 'wins' and controls the entire configuration of that plugin. For example, don't declare the tiles plugin in the common struts config. Instead, make a separate tiles-defs-common.xml file and reuse *that* file when you initialize the tiles plugin for the module. Good luck; hopefully my mistakes can save you some pain. =) David Hibbs, ACS Staff Programmer / Analyst American National Insurance Company --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]