problème avec LookupDispatchAction
salut
j'ai une problème d'utilisation d'une action de type LookupDispatchAction.j'ai toujours une erreur
Code:
Servlet error: Action[/affecterCourrier] missing resource in key method map
voici mon action
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
public class AffecterCourrierAction extends LookupDispatchAction{
protected Map getKeyMethodMap() {
Map map = new HashMap();
map.put("bouton.enregistrer","enregistrer");
map.put("bouton.details","details");
map.put("bouton.quitter","quitter");
return map;
}
public ActionForward enregistrer(ActionMapping mapping,ActionForm form,HttpServletRequest request,
HttpServletResponse response)
throws Exception, ServletException,SQLException {
.............
....
}
public ActionForward detailsActionMapping mapping,ActionForm form,HttpServletRequest request,
HttpServletResponse response)
throws Exception, ServletException,SQLException {
.............
....
} |
voici le jsp
Code:
1 2 3 4 5 6 7 8 9
|
....
<html:form action="/affecterCourrier" method="POST" >
.................
<tr>
<td align="right"> <html:submit property="affectation" > <bean:message key = 'bouton.enregistrer'/> </html:submit></td>
<td align="center"> <html:reset > <bean:message key="bouton.effacer"/> </html:reset></td>
<td align="left"> <html:submit property="affectation" > <bean:message key='bouton.quitter'/> </html:submit></td>
</tr> |
voici la configuration
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
.....
<action-mappings>
......
<action
path="/affecterCourrier"
type="GestionDemande.AffecterCourrierAction"
name="AffecterCourrierForm"
scope="request"
input="/JSP/GestDemande/AffecterCourrier.jsp"
parameter="affectation"
validate="false">
<forward name="cancel" path="/JSP/Home.jsp"/>
<forward name="failure" path="/JSP/GestDemande/AffecterCourrier.jsp"/>
<forward name="success" path="/JSP/Home.jsp"/>
</action>
</action-mappings>
<message-resources parameter="project1.ApplicationResources"/>
</struts-config> |