File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Showing richtext data on to Browser.

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a database field in SQL server database defined as text datatype, the data stored in that field can be either text, Images, Signatures. Is there any way in JSP to show the data on the browser, (the data stored in the database)i.e. the Images or Signatures as Images or Signatures.
Please suggest me.
Thanks,
Narasimham
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13047
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember that a browser has to make a separate request for an image, you can't mix the image data in with the HTML.
Your JSP page will have to find out what kind of data is in the record and format output accordingly. You will have to use a servlet to serve image data because you have to set the content type and content length. Sounds like a job for a bean shared between the JSP and a servlet.
Bill

------------------
author of:
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"nvssin",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in again with a new name which meets the requirements.
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic