In my project, I update the details, so I created an action, but it gives me an exception in response as
No result defined for action org.employee.actions.EmployeeMyProfileAction and result input
In struts.xml(To)
<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');
}
});
}
}
This gives me a success message in jQuery, but no action class will be declared. I did not understand why this happens after everything is correct. I linked to many sites for this, but did not decide. Please suggest me what goes wrong.
source
share