Results 1 to 7 of 7
  1. #1
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    149
    Rep Power
    0

    Default Display MS-Word file in browser

    How to display a word file in the browser..when i tried with
    <A HREF="C:\Desktop\a.doc">Here</A>

    it is giving save/open option..how to open this in the browser directly...

    thanks in advance

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    hkansal is offline Member
    Join Date
    Oct 2008
    Posts
    7
    Rep Power
    0

    Default

    jazz,
    the only way to justify your post here is that you might want to read the .doc file in a jsp/servlet and display the contents using an expression in the browser. For that simple I/O is required.

    @Eranga,
    I just hope that's not the case. :p

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by hkansal View Post

    @Eranga,
    I just hope that's not the case. :p
    It is,

    Java Code:
    <A HREF="C:\Desktop\a.doc">Here</A>
    Here nothing to do with JSP or Servlet. Thread starter should ask his question much clearly in that sense.

  5. #5
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    149
    Rep Power
    0

    Default

    thanks for your replies...yeah i want to disply .doc and .xls files in the browser using JSP/Servlet...for that i succeeded with some settings in the browser,go to a Folder then click on Tools | Folder Types | File Options and go down to DOC, click on Advanced and remove the checkbox from 'Browse in same window'. If i user <A HREF="C:\Desktop\a.doc">Here</A> this is opening in a new window....

    Any suggestions please welcome

    Thnx

    But how to view them using JSP???

  6. #6
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    149
    Rep Power
    0

    Default

    i got it...

    Here is the possiblity

    Using MIME types we can display a word file in the browser...

    but, again here my problem starts,

    m not able to display my .xls file...though the syntax is same...

    any help please

  7. #7
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    149
    Rep Power
    0

Similar Threads

  1. How to print a HTML file in browser look using JAVA
    By ammameiya in forum Advanced Java
    Replies: 5
    Last Post: 06-25-2010, 03:36 AM
  2. Replies: 7
    Last Post: 11-19-2008, 03:09 PM
  3. File Browser
    By Troman in forum SWT / JFace
    Replies: 5
    Last Post: 09-09-2008, 02:02 PM
  4. Replies: 13
    Last Post: 01-09-2008, 07:51 AM
  5. Replies: 0
    Last Post: 12-06-2007, 07:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •