L’URI absolu: http://java.sun.com/jsp/jstl/core ne peut pas être résolu

L'URI absolue:http://java.sun.com/jsp/jstl/core ne peut pas être résolue

Développement d'un Spring MVC, en utilisant un fichier JSP comme ressource View.

example.jsp

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


Spring MVC web application

Ci-dessus est une simple page JSP, mais frappe l'erreur jstl suivante?

SEVERE: Servlet.service() for servlet mvc-dispatcher threw 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

  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)
  //...

Solution

Par défaut, le pot jstl n'est pas inclus dans le framework Spring. Pour le corriger, déclare la dépendance jstl comme ceci:

pom.xml

  
    jstl
    jstl
    1.2