Jstl non reconnu dans mes pages jsp
Bonjour
J'ai inséré la dépendance jstl dans mon pom.xml pour pouvoir l'utiliser dans mes pages jsp:
Code:
1 2 3 4
| <dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency> |
Cependant, lorsque je fais appel à ce code dans ma page jsp:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="fr" >
<body>
<c:if test="${pageContext.request.userPrincipal.name != null}">
<form id="logoutForm" method="POST" action="${contextPath}/logout">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
</form>
<h2>Welcome ${pageContext.request.userPrincipal.name} | <a onclick="document.forms['logoutForm'].submit()">Logout</a></h2>
</c:if>
</body> |
Je reçois ces messages d'erreur au niveau de la page jsp:
Citation:
javax.servlet.jsp.JspException cannot be resolved to a type
Citation:
Multiple annotations found at this line:
- javax.servlet.jsp.PageContext cannot be resolved
to a type
J'ai pourtant fait mvn clean install pour l'installation des dépendances.
Merci