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

http //java.sun.com/jsp/jstl/core cannot be resolved spring boot
the absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved spring boot
http //java.sun.com/jsp/jstl/core jar
can not find the tag library descriptor for http: java sun com jstl core
jstl maven
http //java.sun.com/jsp/jstl/core maven
jstl jar download for tomcat 9
jstl license

I don't know what I've done incorrectly, but I can't include JSTL. I have jstl-1.2.jar, but unfortunately I get exception:

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/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:51)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
    at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:429)
    at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
    at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1439)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:137)
    at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:170)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    at java.lang.Thread.run(Thread.java:619)

I have:

  • pom.xml

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.1</version>
      <scope>provided</scope>
    </dependency>
    
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>1.1.2</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>
    
  • web.xml

    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      version="2.5">
    
  • index.jsp

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

The absolute uri: http://java.sun.com/jsp/jstl/core , Remove the standard.jar . It's apparently of old JSTL 1.0 version when the TLD URIs were without the /jsp path. With JSTL 1.2 as available here  The absolute uri: http://java.sun.com/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application [duplicate]

@BalusC is completely right, but If you still encounter this exception, it means that something you have done wrong. The most important information you will find is on the SO JSTL Tag Info page.

Basically this is a summary of what you need to do to deal with this exception.

  1. Check the servlet version in web.xml: <web-app version="2.5">

  2. Check if JSTL version is supported for this servlet version: Servlet version 2.5 uses JSTL 1.2 or Servlet version 2.4 uses JSTL 1.1

  3. Your servlet container must have the appropriate library, or you must include it manually in your application. For example: JSTL 1.2 requires jstl-1.2.jar

What to do with Tomcat 5 or 6:

You need to include appropriate jar(s) into your WEB-INF/lib directory (it will work only for your application) or to the tomcat/lib (will work globally for all applications).

The last thing is a taglib in your jsp files. For JSTL 1.2 correct one is this:

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

The absolute uri: http://java.sun.com/jsp/jstl/core , 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  The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved, JSTL Absolute URI issue and solution, JSTL version issue

I found another reason for this type of error: in my case, someone set the conf/catalina.properties setting tomcat.util.scan.StandardJarScanFilter.jarsToSkip property to * to avoid log warning messages, thereby skipping the necessary scan by Tomcat. Changing this back to the Tomcat default and adding an appropriate list of jars to skip (not including jstl-1.2 or spring-webmvc) solved the problem.

The absolute uri: http://java.sun.com/jsp/jstl/core cannot , message 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. In case you're actually using a normal Java EE server such as WildFly, Payara, etc instead of a barebones servletcontainer such as Tomcat, Jetty, etc, then you don't need to explicitly install JSTL at all. Normal Java EE servers already provide JSTL out the box. In other words, you don't need to add JSTL to pom.xml nor to drop any JAR/TLD files

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

also please check for the dependency jars that you have added javax.servlet.jar and javax.servlet.jsp.jstl-1.2.1.jar or not in your WEB-INF/lib folder. In my case these two solved the issue.

The absolute uri: http://java.sun.com/jsp/jstl/core , In order to use these jstl tags in jsp pages, the dependency for the jstl library must be added. When you build a spring boot mvc application with a jsp page  The JSTL jar needs to be inside the WEB-INF/lib folder. When you do that and refresh your project, I think Eclipse will automatically add it to your Web App Libraries. When you do that and refresh your project, I think Eclipse will automatically add it to your Web App Libraries.

  1. Download jstl-1.2.jar
  2. Add this directive to your page: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

  3. Paste the JAR file in your WEB-INF/lib folder. This should work. (It worked for me.)

org.apache.jasper.JasperException: The absolute uri: http://java.sun , JasperException The absolute uri http //java.sun.com/jsp/jstl/core cannot be resolved Tomcat 6 and higher (JSP 2.1+) should use version 1.2. 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

JSTL Core Issue, In applications, you will get the below error when you use JSTL along with maven and spring applications: Error Info: HTTP Status 500 – The absolute uri:  supprimer le standard.jar.Il semble qu'il s'agisse d'une ancienne version JSTL 1.0 alors que les URIs de TLD n'avaient pas le chemin /jsp.Avec JSTL 1.2 comme disponible ici vous n'avez pas besoin d'un standard.jar du tout.

jsp/jstl/core cannot be resolved in either web.xml or the jar files , JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved Of course, I have the correct taglib in the JSPs (note the /jsp within the URI): This is the long way to discover where Tomcat is installed. #Java programing How to add JSTL.jar and Standard.jar to our eclipse project go to google and follow instruction search for jstl.jar and standard.jar click on link of www.java2s.com download both

Tomcat and JSTL: sometimes I feel tired, absolute uri (http://java.sun.com/jsp/jstl/core ) cannot be resolved in either web.​xml This absolute uri cannot be resolved in either web.xml or the jar files If the JSTL library you use is inconsistent with the JSP statement. jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

Comments
  • I had to add the taglibs depdendency too beside the jstl and just worked.
  • I've changed to /jsp and: org.apache.jasper.JasperException: The absolute uri: java.sun.com/jsp/jstl/core cannot be resolved in either web.xml ....
  • Then your classpath is a mess. Cleanup it. I don't know what maven is doing and whether it's smart, but for JSTL 1.2 you do not need the standard taglib. Read the tag info page for more detail.
  • I really like the JSTL wiki page that you put together. However, since this question is the top hit from Google for the particular error message, I'm taking the liberty to edit it and note that the "non-jsp" URI is from JSTL 1.0.
  • @kdgregory: Thank you :)
  • if you're using Gradle, add this dependency: compile('javax.servlet:jstl:1.2')
  • I've noticed that this question is quite popular (many viewers). So this is why I had decided to write short tutorial how to deal with this problem
  • Yes!. Me too. Someone (=myself) at some point put tomcat.util.scan.StandardJarScanFilter.jarsToSkip=* into catalina.properties file in a (misunderstood?) attempt to speed up Tomcat start up time. Arghh!
  • I use the following script to create a jarsToSkip list which avoids TLDs and web-fragment jars: pastebin.com/3Bfm1u6K
  • If you don't want to change your jarsToSkip setting, below it there is a jarsToScan setting that overrides anything in jarsToSkip. We ended up adding taglibs*.jar to our jarsToScan as our taglibs were taglibs-standard-impl-1.2.5.jar and taglibs-standard-spec-1.2.5.jar.
  • This is the answer that worked for me. In conf/catalina.properties, I changed tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar to tomcat.util.scan.StandardJarScanFilter.jarsToScan=jstl*.jar and that fixed it.
  • can you please have a look at the question here[stackoverflow.com/questions/44039706/…
  • Interesting, when I search for jstl in maven I find myself in: mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl/1.2 How did you find this dependency?
  • +1 After hitting my head against the wall for hours, using jstl-1.2 instead of jstl-1.2.1 worked for me as well, and I have no idea why.