Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with download file using struts

 
Satish Kumar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using struts to download a file.
in the link for downloading file in order to open in a new browser i have user target="_blank" in ahref tag
<a href="path" target="_blank">
the following code opens a pop asking for open save and cancel dialog
response.setHeader("Content-disposition", "attachment; filename="
+ oSWFDownloadVO.getStrFileName())
when i click on save , it opens a blank browser window. is there any way to close the blank browser window when save is clicked.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just remove target="_blank". Since you've specified that it is an attachment, even if the user selects "open", it will be opened in a new window anyway.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic