struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Ying <liying.cn.2...@gmail.com>
Subject Re: Calling Struts Action from JavaScript
Date Wed, 01 Dec 2010 15:13:25 GMT
2010/12/1 Anjib Mulepati <anjibcs@hotmail.com>:
> 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


Mime
View raw message