That's not the way the web works. You send a request, you get a response.
What is traditionally done for long running processes:
A request initiaties a long-running process in a separate thread, or even in another program such as daemon.A means is created for subsequent requests to get information about the process. Could just be a class that's available in the session that contains info like percentage of completion, or messages. Or the info could be stored in a database.The response returns indicating that the process is started.Create a way for users to submit requests to see the progress, or do so automatically at intervals. The request looks at the info in the "progress" class or database to know what the long-running process is doing, and can report it back to the front-end in the response.
Or you might want to look into
web sockets, or
Comet, but those're a bit of a can of worms.