I call the servlet via href in my .vm file (since I use the framework speed for the front end) when the request is sent to the servlet. I am uploading a file. Generating files to download takes about 30 seconds, so I want to specify the end user through a popup window. To do this, I called a function on the same href in my .vm file, which opens a pop-up window indicating that the file is currently being generated so Please wait. but when you create and upload files, I want to remove this popup. I tried this through redirecting to the servlet, but after googled I found that we cannot change the status of the response after loading ( link ).
I call javascript function and servlet in my vm file as
<a href="/overriderulehandler?report=1" onClick="return reportResponse()"> Generate Report </a>
the overriderulehandler calls my servlet, and I prepare the file for upload here, and reportResponse is a JS function in which I open a popup.
Please suggest me how I should complete this task. If anyone has any other ideas, please share. Any help is appreciated.
java javascript servlets
kailash gaur
source share