• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getResourceAsStream

 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
can anybody explain to me why when using the getResourceAsStrem() for downloading file, the file takes the name of the servlet and not what the file is called, say My.doc When it has downloaded i have to change the name backagain then i can open it.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using HTTP header Content-Disposition:
http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html
 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers for that Satou i found it a great help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic