Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Open .doc file in web page (http://www.velocityreviews.com/forums/t389515-open-doc-file-in-web-page.html)

Rahul 12-18-2006 02:50 PM

Open .doc file in web page
 
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


Andrew Thompson 12-18-2006 04:38 PM

Re: Open .doc file in web page
 
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.



All times are GMT. The time now is 11:25 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.