Hi, first of all, I'm not sure if i'm posting at the correct section since my problem cover across a few sections (I think).
Ok so here's the situation:
I have a saved record with a Blob field in the database saved in byte using iBatis.
So now I need to retrieve it through the servlet. And because I'm using SmartGWT, i will need to parse the record (in a JavaBean object) to a XML to be sent from the Server to the Client side.
How do I convert the byte into a proper data type so that I can parse it into a XML and send it over so I can display the picture on the client side?
If i decide to use a link which will allow user to click and download the image instead of displaying it directly, how do i do it?
I would prefer to approach it a bit differently.
The GWT Image class has an overridden constructor which accepts an URL. On the UI, let this point to your servlet.
In the servlet side, it would be the standard procedure of converting the byte to an Image and writing it to the stream.