• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Downloads  RSS feed

 
Mike London
Ranch Hand
Posts: 1441
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I create a file on the Web Server in a directory for a user based on his selections in a JSP form.

Is there a way to automatically show a download dialog for the user once I'm done creating the text file on the server?

Thanks in advance.

-- Mike
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question is much too vague to offer any advice other than, after the file is created, display a page that has a link to the file.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or, perhaps, you could redirect to the URL of the file which will initiaite the download (perhaps what you meant by automatic?)
 
Paul Clapham
Sheriff
Posts: 22375
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or don't even produce a file, just have whatever is responding to the link write its output directly to the response object. Remember to set the MIME type for the file in the appropriate header.
 
Mike London
Ranch Hand
Posts: 1441
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all for the great ideas!!!

-- Mike
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!