For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Thursday, October 10, 2013

Action does not contain specified method (check logs)

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
 
Share:

0 comments:

Post a Comment

Unable to resolve <website url> Try checking the for validity Google Pagespeed Insights

Unable to resolve <website url> Try checking the for validity Google Pagespeed Insights   You have a website and want to test it'...

Ads Inside Post

Powered by Blogger.

Arsip

Blog Archive