I have written some code that allows user to enter the code in a textbox and I run that code in a separate process and collect the output of the code, and return the response from a servlet to the browser.
Problem is
What if the user made a program of infinite loop....so process will keep on running and writing to browser stream happens once, how can i write to the browser's stream in the case of an infinite for loop.