Ich rufe Struts2 Aktion von jQuery mit Parameter, aber Aktion Methode wird nicht aufgerufen.Struts2 Aktion mit Parameter funktioniert nicht
Aber wenn ich die Aktion ohne Parameter aufgerufen, dann funktioniert es perfekt.
Aufruf Aktion:
$('#redemptionForm').attr('action','sendRedempOTP?pbCardNo='+cardNo+'&mobile='+mobileNumber+'&isSearchByMobileNoFlag='+searchByMobileNoFlag);
Struts2 Aktion 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-Klasse-Methode:
public String sendOTP() {
LOGGER.info("Send OTP called");
String cardNumber = request.getParameter("pbCardNo");
String mobile = request.getParameter("mobile");
String isSearchByMobileNoFlag = request.getParameter("isSearchByMobileNoFlag");
}
Wenn ich diese Aktion anrufe, funktioniert sie nicht. Ich bin unter Ausnahme bekommen:
No configuration found for the specified action: 'login' in namespace:
Was ist mit diesem Code falsch?
Meine JSP Seite:
<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>
bitte post Ihre JSP-Code. –
Ich kann Ihren Jquery-Code nicht sehen. –
Ich habe oben erwähnt, wie ich meine Aktion von JSP-Seite aufgerufen habe. –