[LookupDispatchAction] missing resource in key method map
j'ai crée une petite application struts avec une action qui étend lookupdispatch, mais il ya un petit problème, je reçois un message erreur voici quelque extrait du code, si quelque vois ou se trouve le problème merci.
ApplicationRessources
Code:
1 2 3
| button.add=Ajouter {0}
button.edit=Modifier {0}
button.delete=Supprimer {0} |
struts-config.xml
Code:
1 2 3 4 5 6 7
| <action
input="/offre.jsp"
name="OffreForm"
parameter="action"
path="/offre"
scope="session"
type="com.myapp.struts.exploreoffre.action.OffreAction"/> |
classe action
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| public class OffreAction extends LookupDispatchAction {
protected Map getKeyMethodMap() {
Map map = new HashMap();
map.put("button.add", "add");
map.put("button.edit", "edit");
map.put("button.delete", "delete");
return map;
}
/** Action called on Add button click
*/
public ActionForward add(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws java.lang.Exception {
// TODO: implement add method
return mapping.findForward("success");
} |
La jsp
Code:
1 2 3 4 5 6 7 8 9 10 11
| <html:form action="/offre">
<html:submit property="action">
<bean:message key="button.add" arg0=""/>
</html:submit>
<html:submit property="action">
<bean:message key="button.edit" arg0=""/>
</html:submit>
<html:submit property="action">
<bean:message key="button.delete" arg0=""/>
</html:submit>
</html:form> |
ce code me semble correct mais je reçois ce message en cliquant sur le [CODE]bouton ajouter:
Code:
1 2
| 25-juin-2007 12:16:17 org.apache.struts.actions.LookupDispatchAction getLookupMapName
GRAVE: Action[/offre] missing resource in key method map 'Ajouter' |
si quelqu'un voit clair, ça sera très sympa