|
Just setting the MIME type of the reply and then writing text to the output stream may not accomplish exactly what you want to do. You need to also write the data in a Microsoft Word format to get full formatting capabilities. If you are looking for a pure Java solution to create Word Documents, and then want to stream them down to the client browser, I would suggest POI (http://jakarta.apache.org/poi/). It's an open source library dedicated to reading and writing Microsoft's OLE2 Compound document format (Word, and Excel mostly). You could use this to generate the word document on the fly, and then stream it down to the client browser after you set the MIME type on the reply. Generating documents in this fashion could be time consuming, so I would suggest caching these generated documents wherever possible, and providing user feedback about the conversion process. We do something similar with converting IBM Content Manager data to PDF on the fly for our e-business web site. ---------------------------------------------------------------------- Chris DeLashmutt Senior R&D Analyst LeasePlan USA 1165 Sanctuary Pkwy., Alpharetta, GA 30004 Phone: 678-202-8695 Fax: 678-566-8551 ---------------------------------------------------------------------- Niall Mcloughlin <niallsemail@yahoo. To: java400-l@xxxxxxxxxxxx com> cc: Sent by: Subject: Java servlet writing to a word document java400-l-bounces@m idrange.com 10/13/2003 01:55 AM Please respond to Java Programming on and around the iSeries / AS400 Afternoon All I'm just going through an idea whereby a servlet picks up paragraphs from a database, and writes it to a Word document. I think I can control this by changing the mime type to "application/word" ( or something similar ) on the response object and then write the results from the database. I'm hoping this would fire up a word document at the client end and display the results in it. Is this along the correct lines, and if not, is there another way of getting java to write to a word document. Regards Niall ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.