The javadoc for LookupDispatchAction is pretty good.
Here's what is wrong. Your buttons needs to get their text from your ApplicationResources.properties file. Most of the other needed changes are in bold. If any of this is not clear to you, the javadoc should be of good use.
ApplicationResources:
button.accept = Accept Data
button.approve = Approve Deal
JSP:
<html:form action="startVerification.do" styleId ="AccVina" method="post">
<html:hidden property="apprCode" value="1"/>
<html:submit styleId="btnVina" property="action" onklick="return DisabDlr()" >
<bean:message key="button.accept"/></html:submit>
</html:form>
<html:form action="startVerification.do" styleId ="ApprDeal" method="post">
<html:hidden property="apprCode" value="4"/>
<html:submit styleId="btnApprove" property="action" >
<bean:message key="button.approve"/></html:submit>
</html:form>
DispatchAction:
protected Map getKeyMethodMap() {
log.info("In side map");
Map map = new HashMap();
map.put("button.accept","accept");
map.put("button.approve","approve");
return map;
}
public ActionForward accept(ActionMapping mapping,ActionForm form,
HttpServletRequest request,HttpServletResponse response ) throws Exception{
// code to accept here
return mapping.findForward("accepted");
}
public ActionForward approve(ActionMapping mapping,ActionForm form,
HttpServletRequest request,HttpServletResponse response ) throws Exception{
// code to approve here
return mapping.findForward("approved");
}
struts-config:
<action name="verificationForm"
parameter="action1"
path="
/startVerification"
scope="session" type="com.odps.eta.verification.action.VerificationAction"
input="/startVerification.jsp"
validate="false">
<!-- forwards here -->
</action>
You should be able to take this and figure out how to also add reject or other buttons/methods to your code.