The problem I am trying to solve is having a javascript function that will perform some functions in sequence.

Step 1) Web client/javascript does some functions locally to the browser.

Step 2) The browser calls a java class/application on the webserver which will perform a number of tasks that only the webserver itself (not the client) can perform.

Step 3) Have the results of step two added to the webpage and displayed in the browser without reloading all the HTML

N.B. Step 2 may take several minutes and it is ok for the client to be essentially inactive during this time.

I'd appreciate any advice or walk throughs/tutorials that may be relevant.

Kind Regards