Bonjour, dans la page principale de mon appli j'ai un menu que j'ai créée avec les balises <nav> <ul> et <li>. a chak noeud j'ai associé un lien avec <a href> puis j'ai mis une variable servant de param de requete avec le lien se trouvant dans <a href>.
Maintenant mon problème c'est que je n'arrive pas à recuperer la variable acompagnant le lien cliqué par l'utilisateur pour lui afficher la page correspondante.
J'essaye de le recuperer dans un managedBean a travers la puis de faire un switch et afficher selon le choix la page correspondante. J'aurai besoin de votre aide pour corriger cela.
Voici mon code;

voici le code de la page d'accueil
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
 
<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
 
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet name="./css/default.css"/>
        <h:outputStylesheet name="./css/cssLayout.css"/>
        <h:outputStylesheet name="./css/css_accueil.css"/>
        <title>Accueil</title>
    </h:head>
 
    <h:body>
        <f:view>
       <div id="top">
 
                <h:graphicImage name="./images/logo.jpg" class="img"/> <h2> SIRH-BIMAO  </h2> 
 
        </div>
        <div id ="nav">
        <nav>
                    <ul id="menu">
                        <li><a href="accueil.jsp?varm=8"> Accueil </a> </li>
			<li><a href="accueil.jsp?varm=1">Dossier Personnel</a>
				<ul>
                                    <li><a href="accueil.jsp?varm=11" > Mon Dossier</a></li>
					<li><a href="accueil.jsp?varm=12"> Mettre a jour Dossier</a></li>
				</ul>
			</li>
			<li><a href="accueil.jsp?varm=2">Congés et Absences</a>
				<ul>
                                    <li><a href="accueil.jsp?varm=21"> Soumettre demande</a></li>
					<li><a href="accueil.jsp?varm=22">Mon historique</a></li>
					<li><a href="accueil.jsp?varm=23">Mon Solde</a></li>
                                        <li><a href="accueil.jsp?varm=24">Consulter Etat</a></li>
 
				</ul>
			</li>
			<li><a href="accueil.jsp?varm=3"> Recrutement</a>
				<ul>
					<li><a href="accueil.jsp?varm=31">Postuler</a></li>
					<li><a href="accueil.jsp?varm=32">Postes Vancants</a></li>
					<li><a href="accueil.jsp?varm=33">Mes candidatures</a></li>
					<li><a href="accueil.jsp?varm=34"></a></li>
				</ul>
			</li>
                        <li><a href="accueil.jsp?varm=4"> Formations</a>
				<ul>
					<li><a href="accueil.jsp?varm=41">Soumettre besoin</a></li>
					<li><a href="accueil.jsp?varm=42">Mes Formations</a></li>
					<li><a href="accueil.jsp?varm=43"></a></li>
				</ul>
			</li>
                         <li><a href="accueil.jsp?varm=5"> Documentation</a>
				<ul>
					<li><a href="accueil.jsp?varm=51">Procedures RH</a></li>
 
				</ul>
			</li>
                        <li><a href="accueil.jsp?varm=6"> Prêts et Avances</a>
				<ul>
					<li><a href="accueil.jsp?varm=61">Soumettre Demande</a></li>
					<li><a href="accueil.jsp?varm=62">Prets en cours</a></li>
					<li><a href="accueil.jsp?varm=63">Demandes en cours</a></li>
					<li><a href="accueil.jsp?varm=64">Validations</a></li>
 
				</ul>
			</li>
                        <li><a href="accueil.jsp?varm=7"> Paramétrage</a>
				<ul>
					<li><a href="accueil.jsp?varm=71"> Mon espace utilisateur </a></li>
 
				</ul>
                        </li>
		</ul>
    </nav>
            </div>
 
 
        <div id="content" class="center_content">
 
                <c:set var="varm" value="${demande_congesBean.choix}" > </c:set>
                <c:choose>
                    <c:when test="${ varm eq '21' }">
                        <ui:include src="pages/demandeConges.xhtml"> </ui:include>
                    </c:when>
                    <c/when ...> </c:when>
                     ...
                </c:choose>
 
        </div>
 
 
        <div id="bottom"> Copyright 2015</div>
</f:view>
    </h:body>
 
</html>

voici la fonction de mon managedBean qui recupère le choix d el'utilisateur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
 
 public String getChoix() throws Exception {
        choix=getRequest().getParameter(VAR_MENU);
 
        return choix;
 
    }