2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

Difference between core and core_rt jstl tag

I have small application that one is working with this import tag.

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

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

I am getting following Exception.


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
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:445)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:117)
    org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:311)
    org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:152)
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1427)
    org.apache.jasper.compiler.Parser.parse(Parser.java:138)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)

Can i know the exact difference.


userimage

if you are using a very old version of JSP (JSP 1.2 or 1.1) you can use either of those. Those are JSTL 1.0 URIs and are not suited to modern versions of JSP.

The two libraries differed in that one would allow run-time expressions as tag attribute values, and one wouldn't. In modern JSP and JSTL, where the JSP engine does all expression evaluation, it's no longer relevant.

Answer is