Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 50F8F45FA for ; Thu, 23 Jun 2011 17:34:23 +0000 (UTC) Received: (qmail 98919 invoked by uid 500); 23 Jun 2011 17:34:21 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 98814 invoked by uid 500); 23 Jun 2011 17:34:20 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 98804 invoked by uid 99); 23 Jun 2011 17:34:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 17:34:20 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 17:34:13 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QZnmq-00062N-3V for user@struts.apache.org; Thu, 23 Jun 2011 10:33:52 -0700 Date: Thu, 23 Jun 2011 10:33:52 -0700 (PDT) From: sivaks75 To: user@struts.apache.org Message-ID: <1308850432101-4518316.post@n5.nabble.com> Subject: ajax request processing issue MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I am using struts 2.2.3 version and pretty new to Struts. I have 2 issues with respect to handling ajax request. Issue 1: I defined a method in Action class and mapped that method to struts.xml mapping and gave that action class name in ajax request URL as given below. Javascript: requestObject = xmlHttpRequestHandler.createXmlHttpRequest(); var url = "serviceContent"; requestObject.open("Get",url,true); Action mapping: services.jsp It did not process the request and got the response as "Not found". Looks like it is not able to map. Hence I decided to implement execute() method in my action class and changed the code as given below Javascript: requestObject = xmlHttpRequestHandler.createXmlHttpRequest(); var url = "ServiceCatalog"; requestObject.open("Get",url,true); Action mapping: services.jsp It works good. It is getting into execute() method. Issue 2: I wanted to pass some additional input to the execute method. I change ajax request url to as given below. var url = "ServiceCatalog?userAction=serviceContent&serviceName="+serviceName; Now it does not go to execute() method and simple does nothing. There is no error. I am getting the return status as success. If I enter that URL(http://localhost:9080/StrutsProject/ServiceCatalog?userAction=serviceContent&serviceName=testService) directly in the browser and the control goes to execute() method, since it is normal form submit. I am not sure why it is not taking the additional input attributes in the request. I cant set those additional attributes as hidden controls, since am not submitting the form. Any help appreciated! Regards, Siva -- View this message in context: http://struts.1045723.n5.nabble.com/ajax-request-processing-issue-tp4518316p4518316.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org