0

I have been scouring the web to find the exact reason/fix for my situation. I have visited these other links on this site:

How to install JSTL? The absolute uri: http://java.sun.com/jstl/core cannot be resolved

https://stackoverflow.com/tags/jstl/info

JSTL 1.2 The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved

And have still come up with the same error when I attempt to build the war file for my site. Earlier it was working on Tomcat 8.5.35. I had updated it to Tomcat 9.0.37 and it all went down the drain. I have updated the Build paths, the environment variables. I have made sure that all other files such as my library and framework files are also updated. I have made sure the build.properties file has the correct tomcat version. In the WEB-INF/web.xml file I have updated the servlet to 4.0 as Tomcat 9 supports. I have added jstl1.2.jar in WEB-INF/lib folder with the other jars my site needs.

Exception:

 [jasper] Jul 20, 2020 3:11:08 PM org.apache.jasper.servlet.TldScanner scanJars
   [jasper] INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
   [jasper] Jul 20, 2020 3:11:10 PM org.apache.jasper.JspC execute
   [jasper] SEVERE: Compilation error
   [jasper] java.util.concurrent.ExecutionException: org.apache.jasper.JasperException: 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
   [jasper]     at java.util.concurrent.FutureTask.report(FutureTask.java:122)
   [jasper]     at java.util.concurrent.FutureTask.get(FutureTask.java:192)
   [jasper]     at org.apache.jasper.JspC.execute(JspC.java:1529)
   [jasper]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
   [jasper]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [jasper]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [jasper]     at java.lang.reflect.Method.invoke(Method.java:498)
   [jasper]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
   [jasper]     at org.apache.tools.ant.Task.perform(Task.java:350)
   [jasper]     at org.apache.tools.ant.Target.execute(Target.java:449)
   [jasper]     at org.apache.tools.ant.Target.performTasks(Target.java:470)
   [jasper]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1391)
   [jasper]     at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
   [jasper]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   [jasper]     at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
   [jasper]     at org.apache.tools.ant.Project.executeTargets(Project.java:1254)
   [jasper]     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:460)
   [jasper]     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:142)
   [jasper] Caused by: org.apache.jasper.JasperException: 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
   [jasper]     at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
   [jasper]     at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:294)
   [jasper]     at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:81)
   [jasper]     at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:251)
   [jasper]     at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:122)
   [jasper]     at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
   [jasper]     at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:489)
   [jasper]     at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1445)
   [jasper]     at org.apache.jasper.compiler.Parser.parse(Parser.java:144)
   [jasper]     at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
   [jasper]     at org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
   [jasper]     at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:206)
   [jasper]     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:386)
   [jasper]     at org.apache.jasper.JspC.processFile(JspC.java:1362)
   [jasper]     at org.apache.jasper.JspC$ProcessFile.call(JspC.java:1886)
   [jasper]     at org.apache.jasper.JspC$ProcessFile.call(JspC.java:1877)
   [jasper]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   [jasper]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   [jasper]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   [jasper]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   [jasper]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   [jasper]     at java.lang.Thread.run(Thread.java:748)
   [jasper] Error count: [1]

BUILD FAILED

jasper "-compile-jsp" that throws the exception (from my build.xml file)

<jasper validateXml="false" uriroot="${build.dir}/jspsrc" 
                webXmlFragment="${build.dir}/jspsrc/generated_web.xml" 
                outputDir="${build.dir}/jspjava" 
                xpoweredby="false" addwebxmlmappings="true"
                erroronusebeaninvalidclassattribute="false"
                compilersourcevm="${javac.version}" compilertargetvm="${javac.version}" />

Beginning of my WEB-INF

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
  version="4.0">

The first page that loads on the site is a consent banner (DoD website), it is here (consent.jsp) that I have the line below:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

[Edit] If I remove this line it builds successfully, is this an issue?

I am using Eclipse...

If you'd like to see something else please let me know, please send help!

1
  • Is the JSTL jar file being packaged into the .war file? Commented Jul 20, 2020 at 21:05

1 Answer 1

1

Answering my own question, it only worked when I packaged JSTL 1.2 jar within tomcat itself in the lib folder.

Thanks

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.