Forums Register Login

Downloading a File and Doing Something Else

+Pie Number of slices to send: Send
My servlet gets a request, and I respond by sending a file. That works okay, but after I get done pushing the file, I'd really like to go somewhere else. But I guess I'd need two requests... one to request the download, and another request to go somewhere else. So what's the 'right' way to do that? Would you do two submits somehow? It looks like this is OT now, but it started out in the servlet ;-) when I inserted the file download and realized my dispatch wasn't going to work any more :-(

--Dale--
+Pie Number of slices to send: Send
One technique I've seen is to send the page you want the viewer to see to the browser that uses Javascript to initiate the download in either another window or to a hidden iframe.
[ July 22, 2005: Message edited by: Bear Bibeault ]
I've been selected to go to the moon! All thanks to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 950 times.
Similar Threads
File download and request Forward
probelom while usuing content-disposition in response.setHeader()
How to access the request from an ActionServlet?
download file from tomcat server
Checksum file download?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 01:22:09.