-
Ajax returning java object (3 messages)
- Posted by: Subhash Shah
- Posted on: December 09 2009 02:40 EST
Is it possible that ajax call returns an object from the server side resource? If yes, Can anyone give an example? Thanks in advance, SubhashThreaded Messages (3)
- Re: Ajax returning java object by Dan Evans on December 10 2009 00:20 EST
- Re: Ajax returning java object by Dan Evans on December 11 2009 15:15 EST
- Either JSON or XML by Sanjay Sharma on December 10 2009 12:39 EST
-
Re: Ajax returning java object[ Go to top ]
- Posted by: Dan Evans
- Posted on: December 10 2009 00:20 EST
- in response to Subhash Shah
Ajax can return text/html. On the other hand, you may receive the java object in XML format. For instance: <?xml version="1.0" encoding="UTF-8"?> 1257731352722 The Jt framework provide Jt/Ajax components to do this: http://freedom.lunarpages.com/Jt/Jt.htm -
Re: Ajax returning java object[ Go to top ]
- Posted by: Dan Evans
- Posted on: December 11 2009 15:15 EST
- in response to Dan Evans
Ajax can return text/XML. Sorry. This is what I meant to say. There are several XML/Bean conversion tools/APIs/libaries. The Jt component is self-contained. It can be easily integrated with any Java application. It takes a couple of lines do the Bean/XML conversion. -
Either JSON or XML[ Go to top ]
- Posted by: Sanjay Sharma
- Posted on: December 10 2009 12:39 EST
- in response to Subhash Shah
You can either use xml based model or JSON based, I personally favor the JSON as it is used in many of the AJAX based apps, also it is much closer to what you need. Hope it helps.