Open .doc file in web page

Discussion in 'Java' started by Rahul, Dec 18, 2006.

  1. Rahul

    Rahul Guest

    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
     
    Rahul, Dec 18, 2006
    #1
    1. Advertising

  2. 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.
     
    Andrew Thompson, Dec 18, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Wallace
    Replies:
    0
    Views:
    496
    John Wallace
    Jul 22, 2003
  2. Andrew
    Replies:
    1
    Views:
    5,672
    Andrew
    Oct 5, 2005
  3. Matt
    Replies:
    3
    Views:
    555
    Tor Iver Wilhelmsen
    Sep 17, 2004
  4. Replies:
    0
    Views:
    149
  5. Mike

    Open Doc/Open XML library

    Mike, Jun 21, 2007, in forum: Ruby
    Replies:
    3
    Views:
    112
Loading...

Share This Page