Bonjour,
quand je tape : http://localhost:8080/struts/index.jsp
l'erreur suiavate s'affiche :
le fichier de configuration struts :
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 type Rapport d'exception message description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête. exception javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.index_jsp._jspService(index_jsp.java:73) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
la page index.jsp :
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 <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"> <struts-config> <!-- =============================================== Form Bean Definitions --> <form-beans> <form-bean name="formi" type="form.UserForm" /> </form-beans> <action-mappings> <action path="/register" name="formi" type="action.UserAction"> <forward name="success" path="/WEB-INF/register.jsp" /> </action> </action-mappings> </struts-config>
les deux class UserForm et UserAction existent et elles sont bien ecrites (enfin j'espere
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 <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> <html:html> <h2>Personne - Formulaire</h2><hr> <html:form action="/register"> <table> <tr> <td>Nom</td> <td><html:text property="nom" size="20" /></td> </tr> <tr> <td>Age</td> <td><html:text property="prenom" size="20"/></td> </tr> </table> <table> <tr> <td><html:submit value="Envoyer" /></td> <td><html:reset value="Retablir" /></td> </tr> </table> </html:form> </html:html>)
je ne sais pas quoi faire pour que cet exemple marche ..
merci d'avance
Partager