Thursday, May 10, 2012

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

If you get below mentioned error

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:53)
 org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
 org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
 org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:310)
 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:1425)
 org.apache.jasper.compiler.Parser.parse(Parser.java:138)
 org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239)
 org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
 org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:197)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
 org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
 org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
 org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

Probably the reason could be you have used below mentioned taglib in your JSP file.

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

You need to get the right version of JSTL in your application's classpath, they use different URIs. If that one's not working, try downloading JSTL 1.2 (jstl-1.2.jar) from http://download.java.net/maven/1/jstl/jars/jstl-1.2.jar, or pull down the 1.1 JSTL jars.

To know more about JSTL Taglib, Please see below links.
http://docs.oracle.com/javaee/5/tutorial/doc/bnake.html
http://jakarta.apache.org/taglibs/doc/standard-doc/GettingStarted.html

No comments:

Post a Comment