The embedded jetty container starting up for integration tests in a separate module fails to successfully run web apps which use tag libraries. The app server starts successfully however when the test case attempts to hit a jsp which imports the tag libraries the server fails with the following exception. This behaviour is not seen when deploying the webapp to an installed tomcat instance or whe using the jetty maven plugin to start the container.
For whatever reason, Jetty's thread's context class loader is set to something other than the webapp classloader when the TldLocationsCache is first initialized. The code will try to scan the context classloader for all jars in WEB-INF/lib, but if the context classloader is set to something else, the jars won't be found.
The workaround is to place the tld files anywhere in WEB-INF. The secondary scan, after the above one, will look for any tld files in WEB-INF and automatically register them.