For an illustration I would like my servlet to respond to http twice. When lengthy work shall be done, I would like to:
- Immediately: Show dialog saying that there will be a delay
- Later: Remove dialog and update the page with results from the lengthy work.
If possible I would like to not use any framework and in case that is inevitable it should preferably be a small one. I would like the solution to be deployable as a .war-file.
Is WebSockets the right way to go?
First attempt was a premade request that waited to be released. Once used it was useless for a third update. Second was push-notices. (Sorry that was silly.) Third was websockets but I cant find examples to copy that fit with .war-deployment. Switching from servletrequest to websocket was not possible due to the forced header-sending combined with the Placeholder output-stream.