File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Showing richtext data on to Browser. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Showing richtext data on to Browser." Watch "Showing richtext data on to Browser." New topic
Author

Showing richtext data on to Browser.

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Mar 22, 2000
Posts: 12759
    
    5
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

Joined: Jan 07, 1999
Posts: 6920
"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.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Showing richtext data on to Browser.
 
Similar Threads
supported content types in jsp
Displaying Images stroerd in the Oracle Database
SQL Server replacing characters
upload a file to dabase
get image from database