In my project I am updating details so I created action, but it gives me exception in response as
No result defined for action org.employee.actions.EmployeeMyProfileAction and result input
In struts.xml
(Before)
<action name="savePersonalDetails" class="org.employee.actions.EmployeeMyProfileAction" method="updateEmployeeDetails">
<result name="success">empMyProfile.jsp</result>
</action>
(After)
<action name="savePersonalDetails" class="org.employee.actions.EmployeeMyProfileAction" method="updateEmployeeDetails">
<result name="success">empMyProfile.jsp</result>
<result name="input">emp-personal-form.jsp</result>
</action>
Ajax Call
function checkPersonal(id) {
if (checkEverythingP()) {
$.ajax({
type : 'POST',
url : 'savePersonalDetails',
data : $('#personalform').serialize(),
success : function(data) {
alert('success');
},
error : function() {
alert('error');
}
});
}
}
It gives me success message in JQuery but It is not going to the action class declared. I didn't understand why it is happening after everything is correct. I referred many sites for this but not resolved. Please suggest me what is going wrong.