title: Jasper exception PWC6188 - Jetty cannot resolve javax.servlet.jstl.fmt TLD to JSTL classes inside project
body: <p>Related: <a href="https://stackoverflow.com/questions/73417710/jetty-upgrading-9-3-0-m1-to-9-3-0-m2-breaks-jsp-functionality-using-maven">Jetty - upgrading 9.3.0.M1 to 9.3.0.M2 breaks JSP functionality using Maven</a></p>
  <p>Related: <a href="https://stackoverflow.com/questions/68140774/jetty-9-migrate-from-jdk1-8-to-jdk11-http-java-sun-com-jsp-jstl-fmt-cannot-b">Jetty 9 migrate from JDK1.8 to JDK11 - http://java.sun.com/jsp/jstl/fmt cannot be resolved in JDK11 - fat exec jar</a></p>
  <p>I have a legacy maven project running on JDK 1.8 (yup, old) that I need to upgrade to JDK 17.</p>
  <p>It runs on an embedded Jetty instance version 9.2.23.v20171218.</p>
  <p>I've spent all day trolling through SO trying at least 9 different fixes advised by others, none work. I have no web.xml file or web-INF folder, virtually all posts refer to these folders in the project?</p>
  <p>Also it is an embedded instance of Jetty (which seems quite unique and a strange use case?)</p>
  <p>The exception on trying to access the project's index.jsp in a browser is</p>
  <pre><code>org.apache.jasper.JasperException: /index.jsp(1,64) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
      at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92)
      at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
      at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:172)
      at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:431)
      at org.apache.jasper.compiler.TagLibraryInfoImpl.&lt;init&gt;(TagLibraryInfoImpl.java:240)
      at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:502)
      at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:582)
      at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1657)
      at org.apache.jasper.compiler.Parser.parse(Parser.java:185)
      at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
      at org.apache.jasper.compiler.ParserController.parse(ParserController.java:145)
      at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:212)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
      at org.eclipse.jetty.jsp.JettyJspServlet.service(JettyJspServlet.java:103)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:499)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      at java.base/java.lang.Thread.run(Thread.java:833)
  ------------------------------------------------------------
  </code></pre>
  <p>I'm aware there are at least 30 posts about this same issue - I've spent today working through them one by one, no joy...</p>
  <p>The error seems related to the fact that the TLD in the JSP tag at the top of my index.jsp is not mapped to the correct class in the referenced JAR, and this only matters if running in any JDK higher then 1.8 (dropped JDK17 and tried JDK11, it also doesn't work). Any JDK above 1.8 seems to give the above exception, and Jetty fails to parse any .JSP files anymore.</p>
  <p>I have the following Maven artifacts as suggested by various SO posts:</p>
  <pre><code>.
  .
  .
         &lt;dependency&gt;
           &lt;groupId&gt;javax.servlet.jsp.jstl&lt;/groupId&gt;
           &lt;artifactId&gt;jstl-api&lt;/artifactId&gt;
           &lt;version&gt;1.2&lt;/version&gt;
         &lt;/dependency&gt;         
         &lt;dependency&gt;
           &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
           &lt;artifactId&gt;jstl&lt;/artifactId&gt;
           &lt;version&gt;1.2&lt;/version&gt;
         &lt;/dependency&gt;
         &lt;dependency&gt;
           &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
           &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
           &lt;version&gt;2.3.1&lt;/version&gt;
         &lt;/dependency&gt;
  .
  .
  .
  </code></pre>
  <p>and can confirm in NetBeans 14 that in &quot;Dependencies&quot; I have</p>
  <pre><code>jstl-1.2.jar
  jstl-api-1.2.jar
  </code></pre>
  <p>If I open jstl-1.2.jar in the Netbeans 14 project view, I can see the exact class complained about, e. g.</p>
  <pre><code>jstl-1.2.jar
   &gt;.
    .
    .
    javax.servlet.jsp.jstl.core
    javax.servlet.jsp.jstl.fmt
    .
    .
    .
  </code></pre>
  <p><strong>are</strong> present in the project JAR.</p>
  <p>My .jsp page's first lines are</p>
  <pre><code>&lt;%@ taglib prefix=&quot;fmt&quot; uri=&quot;http://java.sun.com/jsp/jstl/fmt&quot; %&gt;
  &lt;%@ taglib prefix=&quot;c&quot; uri=&quot;http://java.sun.com/jsp/jstl/core&quot; %&gt;
  .
  .
  .
  </code></pre>
  <p>How can I get Jetty / Jasper to find jstl-1.2.jar's &quot;fmt&quot; and &quot;core&quot; classes inside the JAR above in my project, and map the TLDs above to those classes so I can get JSP functionality back in any JDK higher than 1.8?</p>
  <p>(As stated, JDK 1.8 works with the above codebase as-is, any JDK of a higher version fails with above exception.)</p>
  <p>ANY help or suggestions appreciated!</p>
  <p>Thanks</p>
  <p>My mvn dependency:tree:</p>
  <pre><code>--- maven-dependency-plugin:2.8:tree (default-cli) @ verdi ---
  [INFO] verishare:verdi:jar:1.0-SNAPSHOT
  [INFO] +- org.slf4j:slf4j-simple:jar:1.7.21:compile
  [INFO] |  \- org.slf4j:slf4j-api:jar:1.7.21:compile
  [INFO] +- org.apache.logging.log4j:log4j-api:jar:2.17.1:compile
  [INFO] +- org.apache.logging.log4j:log4j-core:jar:2.17.1:compile
  [INFO] +- junit:junit:jar:4.11:test
  [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
  [INFO] +- org.eclipse.jetty.websocket:websocket-client:jar:9.2.23.v20171218:compile
  [INFO] |  +- org.eclipse.jetty:jetty-util:jar:9.2.23.v20171218:compile
  [INFO] |  +- org.eclipse.jetty:jetty-io:jar:9.2.23.v20171218:compile
  [INFO] |  \- org.eclipse.jetty.websocket:websocket-common:jar:9.2.23.v20171218:compile
  [INFO] |     \- org.eclipse.jetty.websocket:websocket-api:jar:9.2.23.v20171218:compile
  [INFO] +- org.eclipse.jetty:jetty-server:jar:9.2.23.v20171218:compile
  [INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
  [INFO] |  \- org.eclipse.jetty:jetty-http:jar:9.2.23.v20171218:compile
  [INFO] +- org.eclipse.jetty:jetty-servlet:jar:9.2.23.v20171218:compile
  [INFO] |  \- org.eclipse.jetty:jetty-security:jar:9.2.23.v20171218:compile
  [INFO] +- com.google.code.gson:gson:jar:2.2.4:compile
  [INFO] +- org.glassfish:javax.json:jar:1.0.4:compile
  [INFO] +- org.apache.commons:commons-dbcp2:jar:2.5.0:compile
  [INFO] |  +- org.apache.commons:commons-pool2:jar:2.6.0:compile
  [INFO] |  \- commons-logging:commons-logging:jar:1.2:compile
  [INFO] +- postgresql:postgresql:jar:9.1-901-1.jdbc4:compile
  [INFO] +- org.eclipse.jetty:jetty-webapp:jar:9.2.23.v20171218:compile
  [INFO] |  \- org.eclipse.jetty:jetty-xml:jar:9.2.23.v20171218:compile
  [INFO] +- org.eclipse.jetty:jetty-jsp:jar:9.2.23.v20171218:compile
  [INFO] |  +- org.eclipse.jetty.toolchain:jetty-schemas:jar:3.1.M0:compile
  [INFO] |  +- javax.servlet.jsp:javax.servlet.jsp-api:jar:2.3.1:compile
  [INFO] |  +- org.glassfish.web:javax.servlet.jsp:jar:2.3.2:compile
  [INFO] |  +- org.eclipse.jetty.orbit:javax.servlet.jsp.jstl:jar:1.2.0.v201105211821:compile
  [INFO] |  +- org.glassfish.web:javax.servlet.jsp.jstl:jar:1.2.2:compile
  [INFO] |  +- org.glassfish:javax.el:jar:3.0.0:compile
  [INFO] |  \- org.eclipse.jetty.orbit:org.eclipse.jdt.core:jar:3.8.2.v20130121:compile
  [INFO] +- com.microsoft.sqlserver:mssql-jdbc:jar:6.4.0.jre8:compile
  [INFO] +- org.mariadb.jdbc:mariadb-java-client:jar:2.7.4:compile
  [INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.1:compile
  [INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.3:compile
  [INFO] |  \- commons-codec:commons-codec:jar:1.9:compile
  [INFO] +- org.glassfish.jersey.core:jersey-server:jar:2.22.1:compile
  [INFO] |  +- org.glassfish.jersey.core:jersey-common:jar:2.22.1:compile
  [INFO] |  |  +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.1:compile
  [INFO] |  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
  [INFO] |  +- org.glassfish.jersey.core:jersey-client:jar:2.22.1:compile
  [INFO] |  +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
  [INFO] |  +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.1:compile
  [INFO] |  +- javax.annotation:javax.annotation-api:jar:1.2:compile
  [INFO] |  +- org.glassfish.hk2:hk2-api:jar:2.4.0-b31:compile
  [INFO] |  |  +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b31:compile
  [INFO] |  |  \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b31:compile
  [INFO] |  +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b31:compile
  [INFO] |  +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b31:compile
  [INFO] |  \- javax.validation:validation-api:jar:1.1.0.Final:compile
  [INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.1:compile
  [INFO] +- org.glassfish.jersey.media:jersey-media-multipart:jar:2.22.1:compile
  [INFO] |  \- org.jvnet.mimepull:mimepull:jar:1.9.6:compile
  [INFO] +- org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.22.1:compile
  [INFO] |  +- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.22.1:compile
  [INFO] |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.5.4:compile
  [INFO] |  \- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.5.4:compile
  [INFO] |     \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.5.4:compile
  [INFO] +- org.glassfish.jersey.containers:jersey-container-jetty-http:jar:2.22.1:compile
  [INFO] |  \- org.eclipse.jetty:jetty-continuation:jar:9.1.1.v20140108:compile
  [INFO] +- org.reflections:reflections:jar:0.9.10:compile
  [INFO] |  +- com.google.guava:guava:jar:15.0:compile
  [INFO] |  +- org.javassist:javassist:jar:3.19.0-GA:compile
  [INFO] |  \- com.google.code.findbugs:annotations:jar:2.0.1:compile
  [INFO] +- com.jcraft:jsch:jar:0.1.53:compile
  [INFO] +- ie.corballis:sox-java:jar:1.0.1:compile
  [INFO] +- com.sun.mail:javax.mail:jar:1.5.0:compile
  [INFO] |  \- javax.activation:activation:jar:1.1:compile
  [INFO] +- org.springframework:spring-web:jar:5.3.0:compile
  [INFO] |  +- org.springframework:spring-beans:jar:5.3.0:compile
  [INFO] |  \- org.springframework:spring-core:jar:5.3.0:compile
  [INFO] |     \- org.springframework:spring-jcl:jar:5.3.0:compile
  [INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.11.3:compile
  [INFO] |  \- com.fasterxml.jackson.core:jackson-core:jar:2.11.3:compile
  [INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.3:compile
  [INFO] +- javax.servlet.jsp.jstl:jstl-api:jar:1.2:compile
  [INFO] |  +- javax.servlet:servlet-api:jar:2.5:compile
  [INFO] |  \- javax.servlet.jsp:jsp-api:jar:2.1:compile
  [INFO] +- javax.servlet:jstl:jar:1.2:compile
  [INFO] \- javax.xml.bind:jaxb-api:jar:2.3.1:compile
  [INFO]    \- javax.activation:javax.activation-api:jar:1.2.0:compile
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  2.017 s
  [INFO] Finished at: 2022-08-24T16:49:34+02:00
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  <p>EDIT: after reading many, many SO posts about exactly this exception I changed to the Apache artifacts, but this changes nothing, the exact same exception <strong>except</strong> for the string &quot;PWC6188&quot; which disappears if I use the Apache artifacts</p>
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
      &lt;artifactId&gt;apache-jsp&lt;/artifactId&gt;
      &lt;version&gt;9.2.23.v20171218&lt;/version&gt;
      &lt;/dependency&gt;
          
       &lt;dependency&gt;
       &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
       &lt;artifactId&gt;apache-jstl&lt;/artifactId&gt;
       &lt;version&gt;9.2.23.v20171218&lt;/version&gt;        
  &lt;/dependency&gt;
  </code></pre>
  <p>iso</p>
  <pre><code>&lt;dependency&gt;
     &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
     &lt;artifactId&gt;jetty-jsp&lt;/artifactId&gt;
     &lt;version&gt;9.2.23.v20171218&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;jstl&lt;/groupId&gt;
      &lt;artifactId&gt;jstl&lt;/artifactId&gt;
      &lt;version&gt;1.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>The rest of the exception text remains the same for the Apache-JSP artifacts, the line numbers just change in the stack trace.</p>