Open .doc file in web page

R

Rahul

Hello All

I want to open an MS word file in jsp page, and want to display the
content on web page as html. The code I'm using is as follows :

<%
String fileName = "c:\\rahul\\test\\readingfile\\abc.txt";

BufferedReader is = new BufferedReader(new FileReader(fileName));

String fileData = "";

while((fileData = is.readLine()) != null)
{
out.println(fileData);
}
%>

But, the data is not printing in proper format.

Please provide the solution.
Rhanking you

Rahul
 
A

Andrew Thompson

Rahul wrote:
......
I want to open an MS word file in jsp page, and want to display the
content on web page as html.

Export the Word doc. to HTML, (run HTMLTidy on
the result) then include it as you might any random
scrap of HTML.
..The code I'm using is as follows :

That code is at least enough to demonstrate that
you have no idea what you are doing.
But, the data is not printing in proper format.

Please provide the solution.

You budget on this matter is, how much?

Andrew T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top