Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Open .doc file in web page

Reply
Thread Tools

Open .doc file in web page

 
 
Rahul
Guest
Posts: n/a
 
      12-18-2006
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

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      12-18-2006
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why this web page stop my "open" action [open-uri]? Tao Ji Ruby 1 02-04-2010 04:13 AM
Re: how to open a file in some application using Tkinter i am usingTKINTER to create GUI application i want to know how to open a worddocument in open office or any other applicatio Fredrik Lundh Python 1 01-09-2008 10:40 AM
How to update the current web page? (delete current web page + rewrite the page) laryten@yahoo.com Javascript 3 10-12-2006 07:33 PM
RE: Web page is not available - "The Web page you requested is not available offline. To view this page, click Connect" =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?= ASP .Net 0 06-07-2004 07:11 AM
Re: Web page is not available - "The Web page you requested is not available offline. To view this page, click Connect" Natty Gur ASP .Net 0 06-06-2004 05:46 AM



Advertisments