aspose file tools*
The moose likes Servlets and the fly likes Servlet downloading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet downloading" Watch "Servlet downloading" New topic
Author

Servlet downloading

Kedar Dravid
Ranch Hand

Joined: May 28, 2004
Posts: 333
I have written a servlet for downloading .doc or .xls files to the client when the client clicks on a link. But, on the client side, the Open/Save dialog box appears twice. I would basically like to know whether the response.addHeader() statement or the response.setContentType() statements result in the Open/Save dialog box appearing. BTW, the link for downloading the Word/Excel files are inside Flash (.swf) files.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Kedar Dravid:
BTW, the link for downloading the Word/Excel files are inside Flash (.swf) files.


Have you tried taking the link out of the swf files to rule out that it could be a flash issue, instead of a problem with your servlet code?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Kedar Dravid
Ranch Hand

Joined: May 28, 2004
Posts: 333
Well, I have solved the problem by commenting the response.setHeader line. But now, the problem is that it is displaying a Page Not Found error on certain client machines, while it downloads properly on other client machines. Wonder if this has got anything to do with IE settings?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Servlet downloading
 
Similar Threads
How to avoid download open/Save dialog box?
Keeping count of downloaded file
Download option in JSP
How to avoid open/Save dialog box while downloading?
problem with download dialog box