Meaningless Drivel is fun!
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
I agree. Here's the link:
subject: exporting doc file
It's not a secret anymore!