Hi, i have one application that run on Tomcat, The application is JSP pages that inturn calls A java file which is actually is the Batch process that inserts data into database.So i want show all the process happening to the client(browser),since all this is happening at server side.I want to get that output(Printed messages), so that i can use it to show it on client side(Browser). Anyone have idea,how can i retrieve this output from server?.
+1
A:
You will need ajax. Check XmlHTTPRequest The idea is:
- send ajax requests to the server (a specific servlet) every X seconds
- define the aforementioned servlet, and define a LinkedList (or any Queue implementation).
- Fill that Queue whenever there is something to be outputted by the batch process
- On each ajax request pop all elements of the queue and send them as response
- After the response is returned, append it to the DOM of the page.
Bozho
2009-11-12 08:05:46