aspose file tools*
The moose likes BEA/Weblogic and the fly likes How to display an image that is stored in a table in Mysql , on a JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "How to display an image that is stored in a table in Mysql , on a JSP page" Watch "How to display an image that is stored in a table in Mysql , on a JSP page" New topic
Author

How to display an image that is stored in a table in Mysql , on a JSP page

pavan manthan
Greenhorn

Joined: Dec 20, 2008
Posts: 6
Hi,
As the sub says .. I have been out of luck today trying to display an image that is inserted into a mysql table on a JSP page. The JSp code to do this is given below. the output of this page when i run it : displays the URL of the page i.e
http://localhost:8080/abc/jsp/helloworld.jsp as an image instead of the actual image from the table. Please help me before I get crazy trying to get this thing working :)


Thank You,
Pavan
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jetendra Ivaturi
Ranch Hand

Joined: Feb 08, 2007
Posts: 159
Well its the only way to store and retrieve the Images from DB. However you are getting the images and storing the files in local directory, so use that relative path and specify the location in your JSP where ever you would like to. Hope that would resolve it. I dont find any convient way apart from this. As I too did the same .

Thanks.


SCJP 1.4 & 1.5, SCWCD 1.5. Learn and Let Learn.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display an image that is stored in a table in Mysql , on a JSP page
 
Similar Threads
Display of images in JSP
How to display an image that is stored in a table in Mysql , on a JSP page
Image Retrieval and Display In JSP From Database
How to retrieve image from ms access database through jsp
how to see the multiple images from database