File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes exporting doc file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "exporting doc file" Watch "exporting doc file" New topic

exporting doc file

suresh pulapally
Ranch Hand

Joined: Mar 15, 2005
Posts: 47
hi all,

iam trying to export .doc file,i have written following code,
response.setHeader ("Content-Disposition", "attachment;filename=merlin.doc");

its asking me to open/save dialogue box,when i click on open button its opening in word document but its does't have any contents,wht could be the reason..

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Are you streaming a word file to the browser?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Consider Paul's rocket mass heater.
subject: exporting doc file
jQuery in Action, 3rd edition