• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to generate MS-word document

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to generate a MS-WORD document ,when the user clicks a link .Am using servlets and jsp for my project.Help me if anyone has already done this stuff.
Regards,
kala.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you will find it much easier to generate a RTF formatted document than a .DOC format. The Apache FOP toolkit can generate .RTF as well as several other output formats. An .RTF document should be accepted by Word, Open Office, Star Office, etc. wp programs.

Most people use FOP to generate .PDF documents but the basic idea permits generating other formats.

As far as I am concerned, Microsoft has in the past deliberately made their word processing formats hard to understand and implement. Under pressure from big users they appear to be taking steps toward an "open" XML based format.

Bill
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also have a look at the Jakarta POI project. Although its DOC support is far behind its XLS support, basic DOC files can be created.

If you really need DOC -and not RTF, as William suggests- have a look at the OpenOffice Java API. You can use it to start up OO, open an RTF file, and save it as DOC.
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, I'd try to change the assignment specs so you don't have to generate Word documents.

If that failed, I'd try one of RTF or better Open Office.

Microsoft really doesn't want you to be able to do what you want.
 
kala mani
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for the suggestions
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic