Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ranjith Kodikara
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic