Very interesting. I didn't know you could now have multiple struts-configs and no modules.
The two problems I had with using modules was (at first) the switching between them as mentioned. I never took to the SwitchAction so I use global forwards which do my module prefixes for me. And second, having to duplicate my (commonly used) messages in each modules resource file (this problem is more of a problem of "why can't I inherit them" than anything else. It seems like multi configs with no modules solves problem 1. I take it that you will still have problem 2. But I did see a post recently about someone who made a code change so that resource files could inherit. Sadly, since I am using modules, I can't think of any advantages of modules if you can have multiple struts config, tiles def and resource files and no modules. -----Original Message----- From: Van Riper, Mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 2:02 PM To: List Struts-User (E-mail) Subject: RE: using modules versus simply using multiple struts-config files > -----Original Message----- > From: Van Riper, Mike > Sent: Tuesday, August 12, 2003 5:55 PM > To: List Struts-User (E-mail) > Subject: using modules versus simply using multiple > struts-config files > > > I did search the archives and there is information about > using multiple > config files and separately about using full-blown modules > too. There may > have been a comparison of the two approaches somewhere in the > archives too, > but, I was not able to find it. Thus, my reason for posting > this to the > group. > > I'm setting up the webapp infrastructure for a new project. > This is the > first opportunity I have to use the new module support in > Struts 1.1. As I > am investigating it, it seems like the new capability to > specify multiple > struts-config files in your default module configuration in > the web.xml file > gets you most of the modularity advantages that multiple > modules provide. > > Sure, you do get to leave the module leading subdirectory out > of your action > mapping definitions when you define separate modules in > web.xml for each > struts-config file. Other than that, I'm not seeing the > advantages of using > full-blown modules when I could just setup separate > struts-config files for > each logical module. On the flip side, you have to deal with properly > switching between modules when you use modules. Also, every > request must go > through an action mapping to use modules. > > Right now, I'm leaning towards setting up separate > struts-config files for > each logical module and simply specifying them as a comma > separated list in > the default module configuration in my web.xml. This is a > relatively small > webapp which can be logically partitioned in to about 5 > areas. Also, there > will be three of us working in parallel on a tight schedule. > So, it seems to > me that I get the modularity benefits without the module > restrictions by > simply setting up separate struts-config files. > > Before going too far down this path, I was interested in any > feedback from > others on the list about this approach. Am I missing > something about the > differences between these two approaches? I love talking to myself. ;-) I know that setting it up with separate modules in web.xml can be made to work, but, I've also seen recent postings about difficulties using tiles and difficulties switching between modules by other module newbies. I'd rather not have to deal with that myself let alone training the other Struts newbies on my current tightly scheduled project. So, I guess I'll go ahead with my current plan to use multiple struts-config files associated with one entry in my web.xml file. The way I'll be setting it up makes it easy to switch to true separate module definitions later on anyway. Each logical module will already have its own subdirectory below the web root. Based on other suggestions I've seen, I'll have a default struts-config file for shared configuration of plug-ins (e.g., tiles), global forwards, controller, etc... In addition, a separate struts-config file for each logical module. > > - Van > > Mike Van Riper > mailto:[EMAIL PROTECTED] > http://www.baychi.org/bof/struts --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

