Bonjour
j'aimerais utiliser JSF 2 pour la présentation et EJB pour le modèle.
j'ai créé un bean entity utilisateur ayant login et mot de passe.
un session bean qui cherche un objet utilisateur par son login et mot de passe.
sur ma page JSF, j'ai mis ceci:
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 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <head> <meta charset=""/> <title>PROJET</title> </head> <body> <header> <h1><h2> </header> <section> <h:form> <h:panelGrid columns="2" cellpadding="2"> <h:outputLabel for="#{}" value="Utilisateur" /> <h:inputText value="#{}" label=""></h:inputText> <h:outputLabel for="#{}" value="Mot de passe" /> <h:inputSecret value="#{}"></h:inputSecret> <h:commandButton type="submit" value="Authentification" action="#{}"></h:commandButton> </h:panelGrid> </h:form> </section> <footer> </footer>
je dois donc créer un javabean pour récupérer la saisie, puis ensuite appeler le session bean qui va recevoir la saisie pour permettre la redirection vers la page principale du profil connecté.
est ce que l'entity bean peut jouer le role du javabean JSF?
pourriez vous m'aider svp, je n'arrive pas à distinguer le role de chaque outil: EJB et JSF, struts?
est ce que c'est possible d'utiliser struts 2 dans ce cas? ou juste JSF?
Merci
Partager