Bonsoir,

j'essaie désespérément de manipuler Ajax sous netbean. J'utilise le plugin Richface.

Dans mon projet toute les librairies sont bien chargées comme j'ai vu sur différents tuto.

Voici mon fichier 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
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
 
<?xml version="1.0"?>
 
<web-app version="2.5" 
                xmlns="http://java.sun.com/xml/ns/javaee"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Greeter</display-name>
 
<context-param>
	<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
	<param-value>server</param-value>
</context-param>
 
<context-param>
	<param-name>org.richfaces.SKIN</param-name>
	<param-value>blueSky</param-value>
</context-param>
 
<context-param>
	<param-name>org.richfaces.CONTROL_SKINNING</param-name>
	<param-value>enable</param-value>
</context-param>
 
<filter> 
	<display-name>RichFaces Filter</display-name> 
	<filter-name>richfaces</filter-name>
	<filter-class>org.ajax4jsf.Filter</filter-class> 
</filter> 
 
<filter-mapping> 
	<filter-name>richfaces</filter-name> 
	<servlet-name>Faces Servlet</servlet-name>
	<dispatcher>REQUEST</dispatcher>
	<dispatcher>FORWARD</dispatcher>
	<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
 
<listener>
	<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
 
<!-- Faces Servlet -->
 
<servlet>
	<servlet-name>Faces Servlet</servlet-name>
	<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
	<load-on-startup>1</load-on-startup>
</servlet>
 
<!-- Faces Servlet Mapping -->
 
<servlet-mapping>
	<servlet-name>Faces Servlet</servlet-name>
	<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
 
<login-config>
	<auth-method>BASIC</auth-method>
</login-config>
 
</web-app>
mon fichier face-config:
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
 
<?xml version='1.0' encoding='UTF-8'?>
 
<!--===============================-->
<!--	   DSI Université Stendhal 	-->
<!--		Application DSIWEB		-->
<!--Autheur: ©Tristan Fleury 201112-->
<!-- tristan.fleury@u-grenoble3.fr -->
<!--===============================-->
 
<faces-config version="2.0"
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
	<application>
		<locale-config>
			<default-locale>fr</default-locale>
		</locale-config>
	</application>
 
	<!-- ========== Gestion de la Navigation ========== -->	
 
	<!-- ========== Gestion des Beans ========== -->
	<managed-bean>
		<description>UsernName Bean</description>
		<managed-bean-name>user</managed-bean-name>
		<managed-bean-class>demo.user</managed-bean-class>
		<managed-bean-scope>request</managed-bean-scope>
		<managed-property>
			<property-name>name</property-name>
			<property-class>java.lang.String</property-class>
		</managed-property>
	</managed-bean>
</faces-config>
ma jsp de test:
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
 
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 
<!-- RichFaces tag library declaration -->
 
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
 
<html>
	<head>
		<title>RichFaces Greeter</title>
	</head>
 
      <body>
		 <f:view>
 
		 </f:view>
	</body>
 
</html>
quand j'exécute le projet j'obtiens 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
 
HTTP Status 500 -
 
type Exception report
 
message
 
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
 
exception
 
org.apache.jasper.JasperException: java.lang.NullPointerException
 
root cause
 
java.lang.NullPointerException
 
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1.1 logs.
GlassFish Server Open Source Edition 3.1.1
si je ne met pas
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
		 <f:view>
 
		 </f:view>
ma page se lance...

je ne comprends pas ce qui cloche