I am calling struts2 action from jQuery with parameter but action method is not called.
But If I called the action without parameter then its working perfectly.
Calling action :
$('#redemptionForm').attr('action','sendRedempOTP?pbCardNo='+cardNo+'&mobile='+mobileNumber+'&isSearchByMobileNoFlag='+searchByMobileNoFlag);
Struts2 action Details:
<action name="sendRedempOTP" class="com.ndil.web.redemption.ViewGiftItemSlabsAction"
method="sendOTP">
<interceptor-ref name="basicStack" />
<result name="error">/jsp/balanceinquirymain2.jsp</result>
<result>/jsp/balanceinquirymain2.jsp</result>
</action>
Action Class method :
public String sendOTP() {
LOGGER.info("Send OTP called");
String cardNumber = request.getParameter("pbCardNo");
String mobile = request.getParameter("mobile");
String isSearchByMobileNoFlag = request.getParameter("isSearchByMobileNoFlag");
}
When I am calling this action then its not working. I am getting below exception :
No configuration found for the specified action: 'login' in namespace:
What is wrong with this code?
My JSP Page:
<s:form action="#" validate="true" method="post" id="redemptionForm">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="1" style="background-color: #999">
<tr>
<td style="background-color: #f1f1f1">
<table width="950" border="0" cellpadding="2" cellspacing="0" align="center">
<tr align="center">
<td class="fieldtxt" width="50%" align="right"><s:text name="redeem.cardNo" /></td>
<td width="50%" align="left"><s:property value="giftRedemptionVO.pbCardNo" /></td>
</tr>
<tr align="center">
<td class="fieldtxt" width="50%" align="right"><s:text name="redeem.mobileNo" /></td>
<td width="50%" align="left"><s:property value="giftRedemptionVO.mobileNo" /></td>
</tr>
<tr id="custNameRow" align="center">
<td class="fieldtxt" width="50%" align="right"><s:text name="redeem.total.available.shopping.value" /></td>
<td width="50%" align="left"><s:property value="giftRedemptionVO.totalAvailableAmount" /></td>
</tr>
</td>
</tr>
</table>
<td><s:submit value="Redeem(SendOTP)" cssClass="crt_btn" id="sendOtpButton" theme="simple"
</td>
</tr>
</table>
</s:form>