Loading
 
What's Next: View All Tutorial →

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

Issue Stacktrace:   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.DefaultErrorHandle...

Published Date: 13/12/2014  Last Modified Date: 13/12/2014    New Post



Issue Stacktrace:

 
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:278)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:76)
	org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:215)
	org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:123)
	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:411)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:469)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1455)
	org.apache.jasper.compiler.Parser.parse(Parser.java:139)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:229)
	org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:200)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:375)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:355)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:342)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)

Make sure the tag lib is added into the dependency lib

 
 <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>
        


Taglibrary inclusion in the JSP file

 
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>


Sample Jsp File:
 
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Spring MVC Helloworld</title>
    </head>
    <body>
        <h1>${greetingText}</h1>
        <h3>${welcomeText}</h3>
    <c:out value="${greetingText}"/>
</body>
</html>
Awaiting for Administrator approval





Tags: [30]

← Back to list


Related Post




×