Bonjour,
Dans une appli web en JAVA, j'utilise JSF et l'ide Netbeans.
Dans cette appli j'ai un managedBean ratioStrateManagerBean.
A l'exécution et l'appel de la page, j'obtiens l'erreur suivante :
Avez-vous une idée ? MERCI pour votre aide.com.sun.faces.mgbean.ManagedBeanCreationException: Impossible de créer le bean géré «ratioStrateManagerBean».
Les problèmes suivants ont été détectés :
- La classe de bean ou de propriété «manager.RatioStrateManagerBean» du bean géré «ratioStrateManagerBean» est introuvable.
Le bean :
Code java : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 package manager import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedProperty; import javax.faces.bean.ViewScoped; @ViewScoped @ManagedBean(name = "ratioStrateManagerBean") public class RatioStrateManagerBean implements Serializable {...}
WEB-INF/web.xml :
Code xml : 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 <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"> <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param> <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>*.xhtml</url-pattern> </servlet-mapping> <session-config> <session-timeout> 30 </session-timeout> </session-config> <welcome-file-list> <welcome-file>pageAccueilSite.xhtml</welcome-file> </welcome-file-list> <context-param> <param-name>primefaces.THEME</param-name> <param-value>#{utilitaireManagerBean.themePrimeFaces}</param-value> </context-param> </web-app>
WEB-INF/faces-config.xml :
Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <?xml version='1.0' encoding='UTF-8'?> <faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> <managed-bean> <managed-bean-name>ratioStrateManagerBean</managed-bean-name> <managed-bean-class>manager.RatioStrateManagerBean</managed-bean-class> <managed-bean-scope>view</managed-bean-scope> </managed-bean> </faces-config>
L'arborescence du projet :
![]()
Partager