This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Welcome to the ranch. First, please don't cross post your questions. Some ranchers who read several of the forums will get annoyed by cross posts and may be less likely to help out. Also, it makes it hard to follow the conversation when people are posting to two different places.
Now, with regards to your question...
My first suggestion would be to save the documents in xml format and parse through them like that. Microsoft Word 2003 and later have the ability to save into XML format, and it is pretty easy to parse through and populate whatever variables you need to before printing off the document.
There are also some APIs out there that can read Word documents. Off the top of my head, I believe the JACOB project, Jakarta POI, and OpenOffice all have API that can read and manipulate Word data. Google them and see what you come up with. Good Luck, and if you have more questions, ask!
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Joined: Oct 13, 2005
Sorry for the croos, I was not sure the right place was JSP or Servlet. First part of your answer is really intersting, I have to study it a little. Second part can't be used, I have to compile the document on the server (AIX) and can't use jacob or any solution not pure java.
I tried to save (from WORD 2000) the doc in html and it produce a lot of html/xml and something else, but there are no true variables that I can compile. I'm going to try WORD 2003.