Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 46815 invoked from network); 1 Dec 2010 15:13:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Dec 2010 15:13:56 -0000 Received: (qmail 27206 invoked by uid 500); 1 Dec 2010 15:13:53 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 27082 invoked by uid 500); 1 Dec 2010 15:13:53 -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 27074 invoked by uid 99); 1 Dec 2010 15:13:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 15:13:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of liying.cn.2010@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qw0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 15:13:46 +0000 Received: by qwj9 with SMTP id 9so1669873qwj.35 for ; Wed, 01 Dec 2010 07:13:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=/ezCGzZXqYgfGmMI0Y8m2oFHyd7iEUMqrGIxKf2C/8k=; b=qPDRKbRinifRZJDe6z0lT5+jgE+j2XzGl3uo9Qe6EK5AJlllnkY01kkJKP97AeNWj/ WaOB4a+WVLMX62luvFOjzDMl5hdSq7M7Kqo+aLx8EeiEz28/jqeDanrWodKHAdnkJ3jL LVZpgayvbb19USZFJXotY79+kD7mNCCzNQ0qc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=k2qyc27TV6EuDdVXaXR2YOwoyXGwyGoJPPaA02tZgoA1sOONHrYwdhEXsiUuFxV3dF NUfh2v8b4cRyDcpbSXB63ChCpQu22/bnSRwst6k2V3mWJ7yX/zKL7W4NyIgX4JY0DSIi JqRlaB1I5k38qx81hVMd3F10jrHPv1kSsmGFM= MIME-Version: 1.0 Received: by 10.229.215.70 with SMTP id hd6mr7534494qcb.48.1291216405958; Wed, 01 Dec 2010 07:13:25 -0800 (PST) Received: by 10.229.222.206 with HTTP; Wed, 1 Dec 2010 07:13:25 -0800 (PST) In-Reply-To: References: Date: Thu, 2 Dec 2010 00:13:25 +0900 Message-ID: Subject: Re: Calling Struts Action from JavaScript From: Li Ying To: Struts Users Mailing List Content-Type: text/plain; charset=UTF-8 2010/12/1 Anjib Mulepati : > Li > When you say sending response using JSON what does that mean? I mean, send a string in JSON format as response. If your response is simple, for example, just a "OK" or "ERROR" flag, you can use plain text. But when you need send a complex data strut back to client side, for example, FLAG=ERROR ERROR_MESSAGE=["input data duplication", "age is out of range"] ...... It will be hard to express in plain text format, so XML or JSON is a better choice. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org