On Wed, 26 May 2004 10:26:34 -0300, Paulo Rezende wrote:
> It's a way but I really dont like it. If I copy all the fields of a table
> to properties of the form, why i dont can copy also the image to a Blob in
> the form and use it? Do I need to create another connection with db and
> run another sql only to get the image?

Yes you'll need separate db calls. Images are always separate urls and are
not 'embedded' into the html.
Your picture servlet will look something like below so it's not like there
is really a lot of extra work involved.

                
                String format = ...;
                byte[] data = ...;
                try{
                    response.reset();
                    response.setContentType(format);
                    ServletOutputStream ss = response.getOutputStream();
                    ss.write(data);
                    ss.close();
                }catch(IOException io){
                    LOG.error("PictureServlet.doGet "+io);
                }

Mick.

-- 
-- <BR/>
"As you go the way of life, you will see a great chasm. Jump. It is not as wide as you 
think." Native American Initiation Rite
<BR/> --- <a href=http://www.harryspractice.com.au>Harry's Practice</a> --- 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to