How does Tomcat handle overlapping/shadowing names in context paths or URLs?

Joe*_*erg 5 url tomcat shadowing overlapping contextpath

How does Tomcat 8.0 serve http requests in the following scenario?

Let's say we have deployed the two web applications "ROOT.war" and "Foo.war" on a server with the name "www.host.com". Furthermore, let's assume that ROOT.war contains a subfolder named "Foo" which contains a file "mypage.html". Additonally, let's assume "Foo.war" also contains a file named "mypage.html". So after extraction of the war-files Tomcat's webapps directory should look like this:

webapps\ROOT\Foo\mypage.html
webapps\Foo\mypage.html
Run Code Online (Sandbox Code Playgroud)

If a user made a request to

http://www.host.com/Foo/mypage.html
Run Code Online (Sandbox Code Playgroud)

in his browser, which file would he be served? The mypage.html from ROOT.war or the one from Foo.war?