You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Don Brown <mr...@twdata.org> on 2003/08/12 02:10:51 UTC

Wildcard-matched actions (again)

I'd like to put the wildcard-matched action code from Bug #21813
(http://issues.apache.org/bugzilla/show_bug.cgi?id=21813) into
Struts.  When I mentioned it last, the only concern I heard raised was
from Craig regarding performance penalties.  As I noted in the bug
description, the path isn't checked against compiled wildcards until an
exact match cannot be found.  Even then, it is only checked against action
mappings that actually contain at least one wildcard.

Let me know if anyone has any reason I shouldn't do this or concerns I can
hopefully alleviate.  Thanks.

Don




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by Ted Husted <hu...@apache.org>.
The one thing that the ticket doesn't say specifically is whether you
are already using the patch in a working application.

If so, and it's working well for you in practice, then I'd say commit it.

But, if its experimental, then I'd say let's roll a 1.2.x GA first
before playing with something this deep in the API.

The cutting point being whether you, as a Committer, have a high-degree
of confidence in the code.

We should probably mark the feature "experimental" in either case, just 
to see what shakes out when it's presented to the Community.

-Ted.

Don Brown wrote:
> I'd like to put the wildcard-matched action code from Bug #21813
> (http://issues.apache.org/bugzilla/show_bug.cgi?id=21813) into
> Struts.  When I mentioned it last, the only concern I heard raised was
> from Craig regarding performance penalties.  As I noted in the bug
> description, the path isn't checked against compiled wildcards until an
> exact match cannot be found.  Even then, it is only checked against action
> mappings that actually contain at least one wildcard.
> 
> Let me know if anyone has any reason I shouldn't do this or concerns I can
> hopefully alleviate.  Thanks.
> 
> Don
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 
> 

-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


RE: Wildcard-matched actions (again)

Posted by "Deadman, Hal" <Ha...@Tallan.com>.
Doesn't the last email from Don imply there is no penalty (if the person
isn't using wildcards)?

-- extract from Don's last email
You still wouldn't see any performance hit as since you aren't using any
action mappings with wildcards, there would be no pattern matching.  It can
only match a URI against a compiled pattern if one or more action mappings
use wildcards.  If there are no compiled patterns, the method will simply
exit and your default action will be matched.

-----Original Message-----
From: David Graham [mailto:grahamdavid1980@yahoo.com] 
Sent: Tuesday, August 12, 2003 3:39 PM
To: Struts Developers List
Subject: Re: Wildcard-matched actions (again)

--- Robert Leland <rl...@apache.org> wrote:
> Matthias Bauer wrote:
> 
> >
> > I would like to be able to turn off this pattern matching feature, as 
> > performance is a very critical issue for a CMS. 
> 
> +1

So far I haven't heard any definitive answer to the performance question. 
If there isn't any performance penalty then we don't need the ability to
turn off pattern matching.  I'm starting to think this enhancement should
wait for 1.2.1 instead of trying to squeeze it in for 1.2.0.

David

> 
> >
> >
> > --- Matthias
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
> >
> >
> 
> 
> -- 
> Robert Leland	                Robert@free2create.org
> ------------------------------------------
> Java, J2EE, Struts, Web Application Development
> 
> 804 N. Kenmore Street		+01-703-525-3580
> Arlington VA 22201
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by Matthias Bauer <Ma...@livinglogic.de>.
If performance is not affected, then there is indeed no need to turn 
this feature off.


Don Brown wrote:

>I apologize if I wasn't clear; there is absolutely no performance penalty
>for any existing or future Struts applications that do not use wildcards.
>Upon initialization of the RequestProcessor, it runs through each action
>mapping to see if any of them use wildcards.  Only if a wildcard is found
>in the path attribute, the path value is compiled and added to a list of
>expressions to test.  Therefore, if wildcards aren't used at all, this
>feature is completely ignored.
>
>When processMapping() is called, the path is tested against compiled
>wildcards only if the following requirements are NOT met:
>
>1) There is no direct match for the path (usual Struts behavior)
>2) There is at least one action mapping that uses wildcards
>
>Therefore, even if your entire application relies on the "default" action
>mapping, if you are not using wildcards, your application will suffer no
>penalty.
>
>As for putting it in post-1.2.0, that is fine.  I've been using the code
>for over a month in my day job's application and it has been in stxx
>(http://stxx.sf.net) for as long.  Furthermore, the core of it comes from
>Cocoon and forms the basis for how pipelines are matched in their sitemap.
>In my application, it cut the number of action mappings by 66% making
>Struts tons more manageable.
>
>But again, its completely optional and doesn't affect anyone who doesn't
>use wildcards.
>
>Don
>
>On Tue, 12 Aug 2003, David Graham wrote:
>
>  
>
>>--- Robert Leland <rl...@apache.org> wrote:
>>    
>>
>>>Matthias Bauer wrote:
>>>
>>>      
>>>
>>>>I would like to be able to turn off this pattern matching feature, as
>>>>performance is a very critical issue for a CMS.
>>>>        
>>>>
>>>+1
>>>      
>>>
>>So far I haven't heard any definitive answer to the performance question.
>>If there isn't any performance penalty then we don't need the ability to
>>turn off pattern matching.  I'm starting to think this enhancement should
>>wait for 1.2.1 instead of trying to squeeze it in for 1.2.0.
>>
>>David
>>
>>    
>>
>>>>--- Matthias
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>--
>>>Robert Leland	                Robert@free2create.org
>>>------------------------------------------
>>>Java, J2EE, Struts, Web Application Development
>>>
>>>804 N. Kenmore Street		+01-703-525-3580
>>>Arlington VA 22201
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>>>
>>>      
>>>
>>__________________________________
>>Do you Yahoo!?
>>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>>http://sitebuilder.yahoo.com
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by Robert Leland <rl...@apache.org>.
Don Brown wrote:

>But again, its completely optional and doesn't affect anyone who doesn't
>use wildcards.
>
+1, I believe we could do it now but will yield to Don's judgment.

-Rob

-- 
Robert Leland	                Robert@free2create.org
------------------------------------------
Java, J2EE, Struts, Web Application Development

804 N. Kenmore Street		+01-703-525-3580
Arlington VA 22201



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by Don Brown <mr...@twdata.org>.
I apologize if I wasn't clear; there is absolutely no performance penalty
for any existing or future Struts applications that do not use wildcards.
Upon initialization of the RequestProcessor, it runs through each action
mapping to see if any of them use wildcards.  Only if a wildcard is found
in the path attribute, the path value is compiled and added to a list of
expressions to test.  Therefore, if wildcards aren't used at all, this
feature is completely ignored.

When processMapping() is called, the path is tested against compiled
wildcards only if the following requirements are NOT met:

1) There is no direct match for the path (usual Struts behavior)
2) There is at least one action mapping that uses wildcards

Therefore, even if your entire application relies on the "default" action
mapping, if you are not using wildcards, your application will suffer no
penalty.

As for putting it in post-1.2.0, that is fine.  I've been using the code
for over a month in my day job's application and it has been in stxx
(http://stxx.sf.net) for as long.  Furthermore, the core of it comes from
Cocoon and forms the basis for how pipelines are matched in their sitemap.
In my application, it cut the number of action mappings by 66% making
Struts tons more manageable.

But again, its completely optional and doesn't affect anyone who doesn't
use wildcards.

Don

On Tue, 12 Aug 2003, David Graham wrote:

> --- Robert Leland <rl...@apache.org> wrote:
> > Matthias Bauer wrote:
> >
> > >
> > > I would like to be able to turn off this pattern matching feature, as
> > > performance is a very critical issue for a CMS.
> >
> > +1
>
> So far I haven't heard any definitive answer to the performance question.
> If there isn't any performance penalty then we don't need the ability to
> turn off pattern matching.  I'm starting to think this enhancement should
> wait for 1.2.1 instead of trying to squeeze it in for 1.2.0.
>
> David
>
> >
> > >
> > >
> > > --- Matthias
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> > >
> > >
> > >
> >
> >
> > --
> > Robert Leland	                Robert@free2create.org
> > ------------------------------------------
> > Java, J2EE, Struts, Web Application Development
> >
> > 804 N. Kenmore Street		+01-703-525-3580
> > Arlington VA 22201
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by David Graham <gr...@yahoo.com>.
--- Robert Leland <rl...@apache.org> wrote:
> Matthias Bauer wrote:
> 
> >
> > I would like to be able to turn off this pattern matching feature, as 
> > performance is a very critical issue for a CMS. 
> 
> +1

So far I haven't heard any definitive answer to the performance question. 
If there isn't any performance penalty then we don't need the ability to
turn off pattern matching.  I'm starting to think this enhancement should
wait for 1.2.1 instead of trying to squeeze it in for 1.2.0.

David

> 
> >
> >
> > --- Matthias
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
> >
> >
> 
> 
> -- 
> Robert Leland	                Robert@free2create.org
> ------------------------------------------
> Java, J2EE, Struts, Web Application Development
> 
> 804 N. Kenmore Street		+01-703-525-3580
> Arlington VA 22201
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by Robert Leland <rl...@apache.org>.
Matthias Bauer wrote:

>
> I would like to be able to turn off this pattern matching feature, as 
> performance is a very critical issue for a CMS. 

+1

>
>
> --- Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>
>


-- 
Robert Leland	                Robert@free2create.org
------------------------------------------
Java, J2EE, Struts, Web Application Development

804 N. Kenmore Street		+01-703-525-3580
Arlington VA 22201



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by mr...@twdata.org.
You still wouldn't see any performance hit as since you aren't using any
action mappings with wildcards, there would be no pattern matching.  It
can only match a URI against a compiled pattern if one or more action
mappings use wildcards.  If there are no compiled patterns, the method
will simply exit and your default action will be matched.

Now, this also would be a good example of an app that could use wildcards.
 You could match the id's and stick them in the parameter of the action
mapping to retrieve in the action.  I currently use wildcards in my Struts
app that exposes REST-style web services where everything is encoded in
the URI.  The wildcard matching code is very fast as the patterns are
pre-compiled and since the code comes stright from Cocoon who has been
using it for quite a while, it has stood the test of time.

Don

> Well, it indeed looks pretty unlikely at first glance. Still, we are
> doing exactly this...
>
> We have built a Content Managment System (it's called XIST4C) that is
> based on Struts. Each normal content page (i. e. each page that is not
> part of an application integrated in the system) is served by a single
> action called DisplayAction, which is the default action. The different
> content pages are distinguished by ids. In order to be as search engine
> friendly as possible, we are encoding these ids in the url instead of
> appending them as query parameters.
>
> Thus, a typical url looks like this:
>  http://www.medi.de/llcms/web/displayAction_id_1586_.htm
>
> I would like to be able to turn off this pattern matching feature, as
> performance is a very critical issue for a CMS.
>
> --- Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by Matthias Bauer <Ma...@livinglogic.de>.
>
>
>>I haven't actually look at the code yet, but as I understand it, wildcards
>>are not even considered unless no other match is found. In which case you
>>would be getting an error page anyway.
>>
>>    
>>
>
>If that's the way it actually works (and I believe this was the original
>proposal), I'm ok with it -- the only potential performance impact for
>existing users would be those who rely on the "default action" capability
>to handle lots of requests, and that seems pretty unlikely.
>

Well, it indeed looks pretty unlikely at first glance. Still, we are 
doing exactly this...

We have built a Content Managment System (it's called XIST4C) that is 
based on Struts. Each normal content page (i. e. each page that is not 
part of an application integrated in the system) is served by a single 
action called DisplayAction, which is the default action. The different 
content pages are distinguished by ids. In order to be as search engine 
friendly as possible, we are encoding these ids in the url instead of 
appending them as query parameters.

Thus, a typical url looks like this: 
 http://www.medi.de/llcms/web/displayAction_id_1586_.htm

I would like to be able to turn off this pattern matching feature, as 
performance is a very critical issue for a CMS.

--- Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


RE: Wildcard-matched actions (again)

Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 11 Aug 2003, Steve Raeburn wrote:

> Date: Mon, 11 Aug 2003 19:55:14 -0700
> From: Steve Raeburn <sr...@apache.org>
> Reply-To: Struts Developers List <st...@jakarta.apache.org>,
>      sraeburn@apache.org
> To: Struts Developers List <st...@jakarta.apache.org>
> Subject: RE: Wildcard-matched actions (again)
>
> I haven't actually look at the code yet, but as I understand it, wildcards
> are not even considered unless no other match is found. In which case you
> would be getting an error page anyway.
>

If that's the way it actually works (and I believe this was the original
proposal), I'm ok with it -- the only potential performance impact for
existing users would be those who rely on the "default action" capability
to handle lots of requests, and that seems pretty unlikely.

> So I don't think there's any performance impact... unless you're in a hurry
> to see that error page :-)
>
> Steve

Craig

>
>
> > -----Original Message-----
> > From: Robert Leland [mailto:rleland@apache.org]
> > Sent: August 11, 2003 7:41 PM
> > To: Struts Developers List
> > Subject: Re: Wildcard-matched actions (again)
> >
> >
> > Don Brown wrote:
> >
> > >Heh, thankfully no. :)  In fact, that's one of the reasons I'd like to
> > >incorporate this into Struts itself to remove that alternate processor
> > >requirement.
> > >
> > >The patch adds a couple of lines to RequestProcessor.processMapping() to,
> > >in the case of no direct mapping found, try to match any wildcards.  All
> > >of the logic of wildcard mapping is stored in a helper class to keep
> > >RequestProcessor as clean as possible.
> > >
> > >Don
> > >
> > How about an option to turn it off ? Having something infinitely
> > configurable is good right ;-) !
> > But seriously, if there will be noticeable overhead the ability should
> > be able to be turned off.
> > In fact once struts configuration is frozen then it should be able to
> > detect whether it needs
> > to search for wild card matches or not.
> >
> > -Rob
> >
> > --
> > Robert Leland	                Robert@free2create.org
> > ------------------------------------------
> > Java, J2EE, Struts, Web Application Development
> >
> > 804 N. Kenmore Street		+01-703-525-3580
> > Arlington VA 22201
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


RE: Wildcard-matched actions (again)

Posted by Steve Raeburn <sr...@apache.org>.
I haven't actually look at the code yet, but as I understand it, wildcards
are not even considered unless no other match is found. In which case you
would be getting an error page anyway.

So I don't think there's any performance impact... unless you're in a hurry
to see that error page :-)

Steve


> -----Original Message-----
> From: Robert Leland [mailto:rleland@apache.org]
> Sent: August 11, 2003 7:41 PM
> To: Struts Developers List
> Subject: Re: Wildcard-matched actions (again)
>
>
> Don Brown wrote:
>
> >Heh, thankfully no. :)  In fact, that's one of the reasons I'd like to
> >incorporate this into Struts itself to remove that alternate processor
> >requirement.
> >
> >The patch adds a couple of lines to RequestProcessor.processMapping() to,
> >in the case of no direct mapping found, try to match any wildcards.  All
> >of the logic of wildcard mapping is stored in a helper class to keep
> >RequestProcessor as clean as possible.
> >
> >Don
> >
> How about an option to turn it off ? Having something infinitely
> configurable is good right ;-) !
> But seriously, if there will be noticeable overhead the ability should
> be able to be turned off.
> In fact once struts configuration is frozen then it should be able to
> detect whether it needs
> to search for wild card matches or not.
>
> -Rob
>
> --
> Robert Leland	                Robert@free2create.org
> ------------------------------------------
> Java, J2EE, Struts, Web Application Development
>
> 804 N. Kenmore Street		+01-703-525-3580
> Arlington VA 22201
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: UML Diagrams (o.a.s.actions)

Posted by Robert Leland <rl...@apache.org>.
Steve Raeburn wrote:

>Rob,
>
>You added the .gif UML diagrams for the actions package a couple of months
>ago. I'd like to add MappingDispatchAction. Is there a source image anywhere
>that I can edit or do I need to edit the .gif itself?
>  
>
I'll check that in. I used SilverRun-JDJ 1.1, it was free from a 
commercial vendor.

-Rob

>Steve
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>
>
>  
>


-- 
Robert Leland	                Robert@free2create.org
------------------------------------------
Java, J2EE, Struts, Web Application Development

804 N. Kenmore Street		+01-703-525-3580
Arlington VA 22201



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


UML Diagrams (o.a.s.actions)

Posted by Steve Raeburn <sr...@apache.org>.
Rob,

You added the .gif UML diagrams for the actions package a couple of months
ago. I'd like to add MappingDispatchAction. Is there a source image anywhere
that I can edit or do I need to edit the .gif itself?

Steve



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by Robert Leland <rl...@apache.org>.
Don Brown wrote:

>Heh, thankfully no. :)  In fact, that's one of the reasons I'd like to
>incorporate this into Struts itself to remove that alternate processor
>requirement.
>
>The patch adds a couple of lines to RequestProcessor.processMapping() to,
>in the case of no direct mapping found, try to match any wildcards.  All
>of the logic of wildcard mapping is stored in a helper class to keep
>RequestProcessor as clean as possible.
>
>Don
>
How about an option to turn it off ? Having something infinitely 
configurable is good right ;-) !
But seriously, if there will be noticeable overhead the ability should 
be able to be turned off.
In fact once struts configuration is frozen then it should be able to 
detect whether it needs
to search for wild card matches or not.

-Rob

-- 
Robert Leland	                Robert@free2create.org
------------------------------------------
Java, J2EE, Struts, Web Application Development

804 N. Kenmore Street		+01-703-525-3580
Arlington VA 22201



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by Don Brown <mr...@twdata.org>.
Heh, thankfully no. :)  In fact, that's one of the reasons I'd like to
incorporate this into Struts itself to remove that alternate processor
requirement.

The patch adds a couple of lines to RequestProcessor.processMapping() to,
in the case of no direct mapping found, try to match any wildcards.  All
of the logic of wildcard mapping is stored in a helper class to keep
RequestProcessor as clean as possible.

Don

On Mon, 11 Aug 2003, David Graham wrote:

> --- Don Brown <mr...@twdata.org> wrote:
> > I'd like to put the wildcard-matched action code from Bug #21813
> > (http://issues.apache.org/bugzilla/show_bug.cgi?id=21813) into
> > Struts.  When I mentioned it last, the only concern I heard raised was
> > from Craig regarding performance penalties.  As I noted in the bug
> > description, the path isn't checked against compiled wildcards until an
> > exact match cannot be found.  Even then, it is only checked against
> > action
> > mappings that actually contain at least one wildcard.
> >
> > Let me know if anyone has any reason I shouldn't do this or concerns I
> > can
> > hopefully alleviate.  Thanks.
>
> Looks pretty neat.  On your site you have a custom
> WildcardRequestProcessor that performs this behavior.  Are you planning on
> incorporating it directly into RequestProcessor now?  I don't think we
> should exasperate the poor RequestProcessor situation any further by
> adding more of them.
>
> David
>
> >
> > Don
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Wildcard-matched actions (again)

Posted by David Graham <gr...@yahoo.com>.
--- Don Brown <mr...@twdata.org> wrote:
> I'd like to put the wildcard-matched action code from Bug #21813
> (http://issues.apache.org/bugzilla/show_bug.cgi?id=21813) into
> Struts.  When I mentioned it last, the only concern I heard raised was
> from Craig regarding performance penalties.  As I noted in the bug
> description, the path isn't checked against compiled wildcards until an
> exact match cannot be found.  Even then, it is only checked against
> action
> mappings that actually contain at least one wildcard.
> 
> Let me know if anyone has any reason I shouldn't do this or concerns I
> can
> hopefully alleviate.  Thanks.

Looks pretty neat.  On your site you have a custom
WildcardRequestProcessor that performs this behavior.  Are you planning on
incorporating it directly into RequestProcessor now?  I don't think we
should exasperate the poor RequestProcessor situation any further by
adding more of them.

David

> 
> Don
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org