You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Ditlinger, Steve" <SD...@ebuilt.com> on 2002/09/24 20:34:05 UTC

FW: DO NOT REPLY [Bug 12702] - ActionServlet selects wrong appl ication module from URL

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

-----Original Message-----
From: bugzilla@apache.org [mailto:bugzilla@apache.org]
Sent: Tuesday, September 24, 2002 10:26 AM
To: sditlinger@ebuilt.com
Subject: DO NOT REPLY [Bug 12702] - ActionServlet selects wrong
application module from URL


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12702>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12702

ActionServlet selects wrong application module from URL





------- Additional Comments From ekbush@swbell.net  2002-09-24 17:26 -------
Created an attachment (id=3202)
Patch to fix selection of module.  This patch extracts the actual module
from the "matchPath" local variable and looks that up as an exact match to
one of the prefixes.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: FW: DO NOT REPLY [Bug 12702] - ActionServlet selects wrong appl ication module from URL

Posted by Eddie Bush <ek...@swbell.net>.
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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>