Search code examples
javajspjstltaglib

Java 11 TLDScanner not loading system TLDs


I have few jsp files which use taglibs example

  • jsp/jstl/core which is system tld
  • jsp-tiles

which are not getting loaded by the TLDScanner( from javax.servlet.jsp 2.3.2) since

  1. there is a check in the code (jstl-1.2.jar) to see if the classloader is an instance of URLClassLoader , From Java 11 the ApplicationClassloader is not a URLClassloader it does not load the tld
  2. tried adding the jstl-1.2.jar in web-inf/lib this also does not work since when isLocal is true it does not load system tlds

Note: the issue does not exist when we use tomcat since tomcat has a TLDScanner which does not work like this and is able to load the TLDs in Java 11

Can some one tell me how to solve this ?


Solution

  • this is basically issue with jettys TLD Scanner, the issue is not there with embedded tomcat

    not sure if latest jetty has fixed this issue.