Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Open/Save attachments

Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to introduce a functionality in my application, in which an attachment when clicked on a JSP page should open the Open/save dialog box. and On clicking Open, the pdf should open.
I am writing a servlet for this. The code in the servlet has the following lines:

response.addHeader("Content-disposition","inline; filename="+fileName);

Now when I click on the attachment link....It first opens me a bank window then opens the open/save dialog box. On clicking Open I am able to open the pdf file or when I click save I am able to save the document to local system.
However I dont know how to remove the blank window that is opening up when I click on the attachment.

Please advise if anyone has encountered similar scenario. I am using IE6.
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try href with the target attribute
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic