This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To send back to the client a partial result(data) from a Servlet

 
Kino Lobo
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys!

Is such a thing possible to do using Ajax?
To send back to the client a partial result(data) from a Servlet process?



The callback function in the request page:


exibe() is a Javascript function wich changes a div's contents on the fly.
I mean, for any loop in the Servlet I'd like to send a partial response to the browser, in opposite of having to wait till the server wind up the whole job and then return the result in a single response...
Any clue? Have someone already done something like this?
Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, a response is a response whether it is the result of an Ajax call or not. If you want to partition it up, you'll need to do so by making multiple requests, each of which return a portion of the data in their own response.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic