Is it possible that ajax call returns an object from the server side resource? If yes, Can anyone give an example? Thanks in advance, Subhash
- Posted by: Subhash Shah
- Posted on: December 09 2009 02:40 EST
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
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.
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.