salut,
je suis en train d'apprendre à utiliser jsf et pour le fun j'ai essayé de voir comment intégrer primefaces.
mais sans succès : eclipse accepte mes composants primefaces mais lorsque je lance la page jsp sur tomcat, rien ne se passe : elle reste blanche.
voici comment je fais :
je créé une nouvelle page jsp et dans l'assistant je choisis une nouvelle page jsf (type "html").
une nouvelle page "jsp" est créée (et c'est pas une page "xhtml").
voici cette page après l'ajout du code :
le code autre que le spinner est un programme tiré d'un livre d'exercices, mais bon ça ne m'intéresse pas bcp pour primefaces.
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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns:p="http://primefaces.prime.com.tr/ui"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <f:view> <p:spinner id="sp"></p:spinner> <h:form id="form2"> <b><h:outputLabel id="ol_titre" value="Inscription : étape 2/2"></h:outputLabel></b><br/> <table> <tr><td><h:outputLabel value="Vos hobbies" id="ol_hobbies"></h:outputLabel></td> <td> <h:selectManyCheckbox id="abc" layout="pageDirection"> <f:selectItem itemLabel="foot" itemValue="foot" id="si_foot"/> <f:selectItem itemLabel="ping-pong" itemValue="piong" id="si_piong"/> <f:selectItem itemLabel="volley" itemValue="volley" id="si_volley"/> </h:selectManyCheckbox> </td> </table> <h:commandButton value="Annuler" action="annuler" type="reset" id="cb_annuler"></h:commandButton> <h:commandButton value="revenir à l'étape 1" action="revenir" type="submit" id="cb_1"></h:commandButton> <h:commandButton value="valider" action="valider" type="submit" id="cb_valider"></h:commandButton> </h:form> </f:view> </body> </html>
c'est une page jsp.
pouvez-vous me dire pourquoi ça ne marche pas?
merci,
olivier.
Partager