Voici un test :

web.xml :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>jsf</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
 
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
 
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
 
</web-app>
faces-config.xml :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>jsf</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
 
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
 
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
 
</web-app>
index.jsp :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
<%@ page contentType="text/html" language="java" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
 
<f:view>
 
    <h:form>
        <h:outputText value="Hello world" />
    </h:form>
 
</f:view>
L'adresse suivante :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
http://localhost:8080/jsf/index.jsf
... génère l'erreur suivante :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
	com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:439)
	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:139)
	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)

Pourquoi cela ?

Oui, je sais cela doit être évident pour beaucoup de monde mais google n'est pas très bavard à ce sujet.

A+