At 8:22 AM -0500 9/3/04, Dave Bender wrote:
Joe,

Thanks for the reply. I'll take a look at modules this morning. That seems like a good solution. If I understand them correctly, I can create six different modules that all point to the same collection of actions and they'd all keep the users 'in their own spot.'

Hm, that's a good point. Normally each module would use a different struts-config file, but if the files are really identical, I don't see why you couldn't point each module to use the same file. Struts also supports using multiple config files (additively) so you could have each module use a shared config file and then have a supplemental config file for the module-specific elements.


On your second point, having different paths vs. creating a session variable, here's my thinking so far (I'm open to doing things differently; this is just how I'm coming into it as a Struts newbie):

- I'm using the URLs to determine which section the user is in. That's what's making it critical that I have control of the URLs.

In the nightly builds, there is support for using wildcards in action mappings. That might help. Not only can you map a pattern, but you can use the "match groups" as parameters to the action so that each action could know in which context it was executing. It sounds like this is what you're doing logically anyway. In fact, as I think about it, if you really use the same config file, then each action probably wouldn't know under which "group" it was executing. Are you actually analyzing the URL in the action, or just changing the config so that each URL is slightly different and carries with it slightly different config parameters?



Note that Struts 1.2.2 was cut a few days ago, and except for the fact that it depends on JDK 1.4 (by accident), there's nothing wrong with it. The binary distribution includes a wrong version of the commons-validator jar, but you can get that from somewhere else. Struts 1.2.3 should be cut next week correcting those two problems.


- I thought about using a session variable, but it seems more unwieldy than using URLs. A detail I didn't mention in my initial posting is that some of the users of the site will be in more than one group. It's conceivable that they could jump from one section to another midway through a work-flow.

OK, then you have a case. Still, you could keep pushing parameters and get the same result. Ultimately here I think you'll just have to make a style call. It will probably take some time, and i suppose odds are good that you'll decide you would have done it differently by the time you're done! (I do that all the time...)


Keep us posted.

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place."
- Carlos Santana


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to