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

Add Dependent Scripts

   here is the code that allow to add dependent script :         <script>         const addDependentScripts = async function( scriptsT...

Ads Inside Post

Powered by Blogger.

Arsip

Blog Archive