My variation on what you've done does not break what you've done.  It works
equally well for single level modules as well as multi-level, whereas the
version you posted precludes the use of multi-level modules.  

Also I think you should not have the trailing "/" in the matchPath as the
solution you have posted does. The prefixes don't include the trailing "/",
unless, perhaps, you have defined the module name as "module/" in the
web.xml.

I was not trying to initiate a competition, but I think the solution that
allows the greater flexibility is the way to go, unless we specifically want
to prevent users from defining multi-level modules.

I went ahead and posted a variation to the proposed patch in Bugzilla (bug #
12702).

Your truly,

Steve

-----Original Message-----
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 12:24 PM
To: Ditlinger, Steve
Cc: Struts Developers List; Malani, Prakash
Subject: Re: FW: DO NOT REPLY [Bug 12702] - ActionServlet selects wrong
appl ication module from URL


Steve,

My intent was to make things work "as expected".  I actually had 
instances where the names of actions were being misunderstood to be 
sub-app names.  Very annoying.  I'm sure the committers would be happy 
to look at any patch you might come up with to add the functionality you 
desire though.  If nothing else, it could go into contrib.

It was never stated (that I am aware of) that there would be 
multi-levels to sub-applications.  As I recall Craig talking about them, 
it was simply to add "one more level" by which things could be broken 
apart - for team-development reasons primarily (each team now has their 
"own" config - less contention).  My view of my "attempt" to fix this 
aberrant behavior is that it is a success :-)  My stuff now works "as 
expected".  I'm sorry it doesn't make possible what you wanted to do, 
but that was never within the scope of the patch (IMHO).

As a side note, and admittedly lacking a full understanding of the "full 
Struts machinery", I believe a change such as the one you desire would 
require more than just patching this one procedure.  Maybe I'm not 
thinking about it correctly - I really haven't sat down and reasoned it, 
but it seems there would be more to it.  Of course, if you have this 
implemented already, you could just "cvs diff -u RequestUtils.java > 
RequestUtils.patch" and attach it to the bug :-)

Kind Regards,

Eddie

Ditlinger, Steve wrote:

>Eddie:
>
>I looked at your fix for the selectApplication.  Thanks for attempting this
>fix.
>
>However, I think it would be better to do this to create the matchPath:
>
>           if (matchPath.lastIndexOf("/") != 0)
>           {
>               // We may be in a non-default sub-app.  Try to get it's
>prefix.
>               int lastSlash = matchPath.lastIndexOf("/");
>               matchPath = matchPath.substring(0, lastSlash);
>           }
>
>This allows for multilevel module names, e.g.: /subapp1  , /subapp1/foo ,
>/subapp1/bar.
>
>What do you think?  What do the committers think?  Should I submit a
>competing path ;-) ?
>Steve
>


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

Reply via email to