Why would you want to do that? Given that the servlet can only send one response, and that it's going to be buffered in transmission, it sounds rather iffy to me. Why not just have your Ajax code send one request for the first bit, then 5 seconds later send another request for the second bit?
Edit: or you could have the servlet send all of the data, and let your Ajax code pick out the bit which is supposed to be displayed 5 seconds later and display it 5 seconds later.
Joined: Apr 11, 2005
Well, basically I wanted to get one client to be able to update a second clients page.
So my idea was for one client to store data as a ServletContextAttribute, then use a listener to 'try to' send data to the other client.
yeah your idea is correct and i too implemented this in my portal.
"Many of lifes failure are people who did not realize how close they were to success when they gave up."
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com