You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by José Moreira <jm...@e-terno.net> on 2003/07/07 13:51:19 UTC

Parameters to Actions

Hello, i'm using this dynamic link to pass a parameters to an action:

http://localhost:8081/deleteEvent.do?action=confirmDelete

* code in deleteEventAction :

        try {
            
            String action = (String) request.getAttribute("action");
            
            if (action.equals("confirmDelete")) {
                
                request.setAttribute("action",action);
                
            }
            
        } catch (NullPointerException e) {
            
            
            System.err.println("attribute action onot found");
        }


but i get an NullPointerException :(


* Action mapping :

<action path="/deleteEvent"
type="org.jcrontab.web.struts.DeleteEventAction" />


what can be the problem ?


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


Re: Parameters to Actions

Posted by Eugen Bushuev <bu...@lucky.net>.
typo in "action" field in input form. maybe...

Jose' Moreira wrote:

>Hello, i'm using this dynamic link to pass a parameters to an action:
>
>http://localhost:8081/deleteEvent.do?action=confirmDelete
>
>* code in deleteEventAction :
>
>        try {
>            
>            String action = (String) request.getAttribute("action");
>            
>            if (action.equals("confirmDelete")) {
>                
>                request.setAttribute("action",action);
>                
>            }
>            
>        } catch (NullPointerException e) {
>            
>            
>            System.err.println("attribute action onot found");
>        }
>
>
>but i get an NullPointerException :(
>
>
>* Action mapping :
>
><action path="/deleteEvent"
>type="org.jcrontab.web.struts.DeleteEventAction" />
>
>
>what can be the problem ?
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>  
>

-- 
С уважением, Е.Бушуев.



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