The empty prefix for the default module is the source of backwards compatibility with Struts 1.0 apps. If you take a 1.0 app and drop it into 1.1, it "just works" because it becomes the default module, with no defined prefix.
Again, assuming you're working on the hierarchical thing, what I did (for a variety of reasons) was have a (very small) number of special cases, in my code that overrides Struts code, where it maps from empty prefix to "common". Then the rest of my code doesn't have to care much about whether or not there's really a prefix. -- Martin Cooper > -----Original Message----- > From: Eddie Bush [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2002 11:58 AM > To: Struts Developers List > Subject: [sub-app] Default Module > > > Why does the default module have a prefix of ""? Isn't this > asymetrical > with the way the others are? I haven't looked at how the names are > actually arrived at. I've run into several spots where it > living at "/" > isntead of "" would ... get rid of "special cases" though. I suppose > this stems fromt he init-param names used to specify the modules (the > default one has no "/" in it's name). > > I'm kind of hacking on selectApplication right now so that it can > accurately determine the sub-app, and this is ... yet another special > case :-) What would I have to do in order to make the > default sub-app > prefix be "/" instead of "", and why would that be bad? What > I want to > do is get matchPath (in selectApplication()) to be > /<module-name>. I'm > ok with the fact that the default module has no name, but I > really think > the beginning "/" should be there. > > Having that startsWith selecting the proper application is > never going > to be anything but a PITA. I'm trying to fix that right now. I'll > await your direction though ;-) If I can fix up the "" to "/" thing > I'll do that at the same time. Still, it seems handling the > one, single > special case at config load (tacking on the "/" to the prefix for the > default sub-application) would be a worthwhile thing to do -- > it would > eliminate many special cases down the road (many instances of > the same > special case, that is) :-) > > (Is there something we can do to make this Zahid guy go > "bye-bye"? He > is going to do nothing but cause confusion ...) > > -- > Eddie Bush > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>