struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DOUILLARD David <David.DOUILL...@mairie-niort.fr>
Subject LookupDispatchAction error
Date Mon, 24 Apr 2006 14:57:14 GMT
Hello,

I have this error using Lookupdispatchaction

javax.servlet.ServletException: Action[/creationuser] missing resource
'valider' in key method map

My jsp have two buttons :

<html:submit property="monaction"> <bean:message key="button.valider" />
</html:submit> <html:submit property="monaction"> <bean:message
key="button.refuser" /> </html:submit>


My ApplicationResources.properties

button.valider=valider 
button.refuser=refuser


My struts-config.xml 

<action input="/saisieUser.jsp" name="creationUserForm"
parameter="monaction" path="/creationuser" scope="request"
type="dsit.user.action.creationUserAction" validate="true"> <forward
name="affichageUser" path="/affichageUser.jsp"/> </action>


And my lookupdispatchaction


public ActionForward refuser(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {


	//Traitement base de données pour refus 
	java.lang.String monMessage = "Refusé!"; 
	request.setAttribute("beanmonMessage",monMessage); 
	return(mapping.findForward("affichageUser")); } 

public ActionForward valider(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {

	//Traitement base de données pour refus 
	java.lang.String monMessage = "Validé!"; 
	request.setAttribute("beanmonMessage",monMessage); 
	return(mapping.findForward("affichageUser")); } 

protected Map getKeyMethodMap() { 
	Map map = new HashMap(); 
	map.put("button.valider","valider"); 
	map.put("button.refuser","refuser"); 
	System.out.print(map.containsKey("button.valider")); // return true 
	System.out.print(map.containsKey("button.refuser")); //return true 
	System.out.print(map.containsValue("valider")); //return true 
	System.out.print(map.containsValue("refuser")); //return true 
	return map;


My button "refuser" works but not my button "valider".
I don't understand why only one button works ?
Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message