I have a Java class that prints progress as 1%, 2%, 3% of a process. Now, I am looking to utilize AJAX requests to read this progress and update it continuously on the webpage. Unfortunately, I cannot convert the Java file into a servlet since it is being used as a scriptlet by Jasper.
The scriptlet code is as follows:
public void afterDetailEval() throws JRScriptletException{
count = (Integer) this.getVariableValue("count");
out.println(count);
Thread.sleep(200);
}
How can I retrieve the data printed by Java through an AJAX request?
Any assistance on this matter would be highly appreciated!