javax.servlet. ServletException: java.lang.
NoSuchMethodException: Action[/salary] does not contain specified method (check logs)
java.lang. NoSuchMethodException: Action[/salary] does not contain specified method (check logs)
Ans: This means "salary" method must be a text in the .jsp file:
public ActionForward salary(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Exception {
LoginForm lfm=(LoginForm)form;
request.setAttribute("empName" , lfm.getAname());
return mapping.findForward("salary");
}
<html:form action="/salary" method="post">
Salary: <html:text property="salary"/><br/>
Emp code <html:text property="empcode"/><br/>
<html:submit value="salary" property="action"/>
</html:form>struts-config.xml
java.lang.
Ans: This means "salary" method must be a text in the .jsp file:
public ActionForward salary(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Exception {
LoginForm lfm=(LoginForm)form;
request.setAttribute("empName"
return mapping.findForward("salary");
}
<html:form action="/salary" method="post">
Salary: <html:text property="salary"/><br/>
Emp code <html:text property="empcode"/><br/>
<html:submit value="salary" property="action"/>
</html:form>struts-config.xml
0 comments:
Post a Comment