• Post Reply Bookmark Topic Watch Topic
  • New Topic

Downloading a File and Doing Something Else  RSS feed

 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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--
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!