struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <>
Subject Re: How to predict wildcard mapping matching order when using Struts annotations
Date Wed, 19 Nov 2014 10:16:31 GMT
2014-11-12 7:42 GMT+01:00 Jim deVos <>:
> When struts encounters a URI that matches multiple wildcard mappings it
> chooses the most recent match (ie. "the last one wins" ).  As a result,  I
> should define less-specific patterns before the more specific  patterns.
> This is simple enough when using XML-based config, but I'm not sure how it
> works with an annotation-based config. Does struts process these mappings
> in a consistent/predictable manner?
> For example, I have two @Action's defined in separate classes (both use
> wildcard mappings).  When struts services a request it appears to match the
> less-specific pattern *last*.  Can I influence the ordering of these
> definitions?   Unfortunately choosing different url patterns is not an
> option available to us.

Can you post an example? As right now it isn't possible to define
order of matching patterns (at least I don't see any) and it can
depend on classpath scanning and class resolution. Maybe it would be
possible to tweak this process...

+ 48 606 323 122

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message