showing a jpeg from a byte stream

Posted on 2006-10-23
Last Modified: 2008-01-09
Hi experts,

I have been putting jpeg byte streams in BLOBs in my mySQL database...

and now i'm wondering if maybe i should have done some sort of file saving technique instead...

Given that I have access to Java servlets, and i am making an AJAX website,

what is the best way that i can show these images to the website user?
(eg. make temporary files out of the byte streams, and send back the link via XML?)
Question by:dbrownell83
  • 2

Accepted Solution

alkisg earned 400 total points
ID: 17791452
<img src="http://myserver/getimage.jsp?index=8">
where getimage.jsp modifies the http headers so that it directly sends an image without writing it to the file system...

Author Comment

ID: 17791540
cool, MIME types.  i forgot about those.  thank you

Expert Comment

ID: 17793674
You're welcome!

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how can display objects ? 3 18
What is assert.deepEqual? 4 39
Apply tab index in forms 6 33
Materializecss - Different Behaviors in Browser's 1 17
Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now