File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Getting object in response to ajax call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Getting object in response to ajax call" Watch "Getting object in response to ajax call" New topic

Getting object in response to ajax call

Aniket Khadke

Joined: Jul 13, 2011
Posts: 29


I am building a online examination system using struts 1. Now to fetch the next question I am making a ajax call to action class and action class should return an object i.e. QuestionDTO. The problem I am facing is I am not able to read/parse that object in java script.

Can anybody tell me what is the best approach to achieve this? Means do I need to use Json like thing? or return a String and split it in java script?

Thanks in advance..!!!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60076


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Getting object in response to ajax call
Similar Threads
Problem getting servlets working
How to call action class from Ajax
Notify Users before session expires
Struts action class call from java script
How to print java Map name/value pair through JSON object in JS