Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No result defined for action and result input

Tags:

struts2

I am using Struts2

I get error as no result defines for action and result input

<action name="update" method="updatePhase" class="Project">
   <result name="updated">/Project.jsp</result>
</action>

My action is not passing to my java class.

Can anyone help me?

like image 421
jones Avatar asked Apr 21 '11 09:04

jones


2 Answers

The error message means that an result named input has not been defined for your action. The result input is a default result returned by Struts when there is a problem with validating the parameters passed to an action. Thus, I recommend to check and ensure that the parameters you are passing from your HTML form match the parameters of your action. Check spelling, data types etc.

like image 159
Tommi Avatar answered Nov 02 '22 00:11

Tommi


I had the same error and I changed my struts.xml file

from
<action name="Registeration101" class="Registeration101">
        <result name="success">pages/inputform.jsp</result>
        <result name="done">pages/quoteSuccess.jsp</result>
    </action>
 to
    <action name="Registeration101" class="Registeration101">
        <result name="success">pages/inputform.jsp</result>
        <result name="input">pages/inputform.jsp</result>
        <result name="done">pages/quoteSuccess.jsp</result>
    </action>

basically result name="input" was not defined

like image 28
Raheel Avatar answered Nov 02 '22 00:11

Raheel