Bonsoir,
je développe une petite application en j2ee(un formulaire qui fait appel à un autre après une validation, le dernier récupère les champs du premier).mais a lancement de l'application
,
j'ai le message d'erreur suivant:
mes fichiers sont les suivant:type Rapport d'exception
message
description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve mapping for action: "/IdentiteFomSubmit"
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
cause mère
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve mapping for action: "/IdentiteFomSubmit"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.pages.formulaire_jsp._jspService(formulaire_jsp.java:85)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
cause mère
javax.servlet.jsp.JspException: Cannot retrieve mapping for action: "/IdentiteFomSubmit"
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:862)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:488)
org.apache.jsp.pages.formulaire_jsp._jspx_meth_html_005fform_005f0(formulaire_jsp.java:138)
org.apache.jsp.pages.formulaire_jsp._jspx_meth_html_005fhtml_005f0(formulaire_jsp.java:111)
org.apache.jsp.pages.formulaire_jsp._jspService(formulaire_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
web.xml
struts-config.xml<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>Formulaire</display-name>
<!-- Configuration de l'action servlet -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
</web-app>
adresse.jsp<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
<struts-config>
<!-- Declaration d'un ActionForm -->
<form-beans>
<form-bean
name ="InscriptionForm"
type ="application.IdentiteForm"/>
</form-beans>
<!-- ========== Mapping des actions ============================== -->
<action-mappings>
<action path = "/IdentiteFormSubmit"
name = "identiteForm"
type = "org.appache.struts.actions.ForwardAction"
parameter = "/pages/adresse.jsp"/>
<action path = "/AdresseSubmit"
name = "identiteForm"
type = "org.appache.struts.actions.ForwardAction"
parameter = "/pages/index.jsp"/>
</action-mappings>
</struts-config>
formulaire.jsp<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles" %>
<%@ taglib prefix="nested" uri="http://struts.apache.org/tags-nested" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<title>Adresse</title>
</head>
<body>
<nested:root property="identiteForm"/>
<html:form action="AdresseSubmit">
<nested:nest property="personne">
Nom:<nested:write property="nom"/><br>
Prenom:<nested:write property="prenom"/><br>
Mail:<nested:write property="mail"/><br>
<br>
<nested:nest property="adresse">
Rue:<nested:text property="rue"/><br>
Code Postal:<nested:text property="codePostal"/><br>
Ville:<nested:text property="ville"/><br>
</nested:nest>
</nested:nest>
<html:submit/>
</html:form>
</body>
</html:html>
j'ai encore les beans:<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles" %>
<%@ taglib prefix="nested" uri="http://struts.apache.org/tags-nested" %>
<html:html lang="true">
<head>
<title>Formulaire d'inscription</title>
</head>
<body>
<html:form action="/IdentiteFomSubmit">
<nested:nest property="identite">
Nom:<nested:text property="nom"/><br>
Prenom:<nested:text property="prenom"/><br>
Mail:<nested:text property="mail"/><br>
</nested:nest>
<br>
<html:submit/>
</html:form>
</body>
</html:html>
Action: InscriptionForm
form:Identite, Adresse.
merci d'avance
Partager