Hi.
This portion of code is valid for display an image stored in a MySQL
db?

//Servlet code. Return of BLOB data it's ok.
[...]
 response.setContentType("image/jpg");
      InputStream in = image.getBinaryStream();
      int length = (int) image.length();
      int bufferSize = 1024;
      byte[] buffer = new byte[bufferSize];
      while ((length = in.read(buffer)) != -1) {
        out.write(buffer, 0, length);
      }
[...]

and on client
Image im = new Image("http://localhost:8080/DisplayImage";);

For test, I don't specify any id parameter to serlvlet. ID parameter
are stored in query on serlvet code.

Daniele.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to