aspose file tools*
The moose likes JSP and the fly likes problems in showing images in jsp with contentType= application /msword Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "problems in showing images in jsp with contentType= application /msword" Watch "problems in showing images in jsp with contentType= application /msword" New topic
Author

problems in showing images in jsp with contentType= application /msword

Ranjith Kodikara
Greenhorn

Joined: Sep 03, 2002
Posts: 15
I have a jsp file written and its contentType is set to "application/msword"
<%@page contentType="application/msword"%>

There is an image included in the file as <img src= ... and the image exists in the correct

place. But I cant see the image in the word document.
If I set contentType to "text/html" it displays the image properly.

when jsp generates a word document there is only a frame that normally appears when the image

is not in place. But image is in place.

If you can write me how to display an image in a word document that generates through a jsp

with setting contentType to application/msword, I would be grateful.

Thanks and best regards,
Ranjith
rajith at dmsswt dot com
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Setting the content type to "application/msword" is appropriate if your streaming an existing word document to a client.

If you want to build one dynamically, however, you will probably need to find some 3rd party libraries for doing so.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problems in showing images in jsp with contentType= application /msword
 
Similar Threads
Export image in a word document using a jsp
Export image in a word document using a jsp
Jsp page export to Word Document without losing format
Opening MS Word
Any way to export a JSP page to a word document?