I have the following action declared in my struts.xml:
<action path="/updateAccountInfo"
type="org.myCompany.UpdateAccountAction"
name="myAccountForm"
scope="session"
validate="true"
parameter="method"
input="/updateAccountInfo.jsp">
<forward name="success" path="/updateAccountInfo.jsp" />
</action>
In my JSP page, I have the following form:
<html:form action="/updateAccountInfo.do">
<input type="hidden" name="method" value="sendMessage" />
In my java class, I have the following method:
public final ActionForward sendMessage(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception {
System.out.println("sending");
return null;
}
Instead of running sendMessage, Struts call the execute method. Why? Is my struts-config wrong? Or am I missing another config setting?