This is a migrated thread and some comments may be shown as answers.

Live Streaming of Sysout and SysErr onto the JSP Page on executing a testcase

0 Answers 62 Views
AJAX and Web 2.0
This is a migrated thread and some comments may be shown as answers.
Akhs 247
Top achievements
Rank 1
Akhs 247 asked on 08 Oct 2009, 06:37 AM
Hei ppl

I am new to this forum.

In my project I am running, say 10 testcases at a time using junit.textui.TestRunner.run(). The Sysout and Syserr are moved into a DB once the testcase execution is complete and I display the results (including Success State and SysOut and SysErr, if applicable)from the DB.
Right now the task I have in front of me is that I need to stream the Sysout and SysErr live (while the testcases are executing) to the JSP. Thought Ajax would be a great option for this. I tried moving the Sysout to a string while the testcase is executing and then refresh the JSP page every 2 secs such that the JSP calls a servlet which fetches the updated Sysout string and displays it in the same JSP.
This page refresh is too costly and a pain of overload on the server.
Thats the main reason why I thought of using Ajax for this matter. Can someone shed some idea on a way to accomplish this.
I have read thru polling, comet/longpolling, piggy back techniques. But I am nt sure how to implement those. Do u think any of these is really required or is there a difft easy efficient method?
I use a JAVA SERVLET - JSP - DB (MVC) model for my project.

No answers yet. Maybe you can help?

Tags
AJAX and Web 2.0
Asked by
Akhs 247
Top achievements
Rank 1
Share this question
or