struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gagan Jain" <jain.ga...@gmail.com>
Subject Re: LookupDispatchAction error
Date Mon, 24 Apr 2006 16:05:11 GMT
just check out in ur struts-config file,
if by mistake u have pressed space or tab after button.valider=valider
even I got the same error once
and this was the mistake

On 4/24/06, DOUILLARD David <David.DOUILLARD@mairie-niort.fr> wrote:
>
> 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
>
>


--
Thanks and Regards
Gagan Jain

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message