It'll load the first match found in classpath. The order is JVM and OS dependent (and essentially arbitrary). You don't want to rely on that and you should fix the .tld
URIs.
If this represents a real world problem and the taglib code is outside your control (which is however quite strange, who would ever copy an URI of an existing taglib? do you really own the other taglib's domain?), then you can always redefine taglib URIs in webapp's web.xml
as follows:
<taglib>
<taglib-uri>http://www.example.com/foo</taglib-uri>
<taglib-location>/WEB-INF/foo.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://www.example.com/bar</taglib-uri>
<taglib-location>/WEB-INF/bar.tld</taglib-location>
</taglib>