Re: Loading Images into GWT via MySQL

2009-04-02 Thread John Ivens
I'd like to thank the contributors for this discussion, particularly Darren, who provided a nice solution to a problem I had making transient images on the server side and displaying them on the client side. On Mon, Mar 16, 2009 at 12:40 AM, alex.d alex.dukhov...@googlemail.comwrote: Does the

Re: Loading Images into GWT via MySQL

2009-03-16 Thread alex.d
Does the img.setUrl(data:image/jpg;base64,...-trick work reliable in all major browsers? On 13 Mrz., 15:07, Darren siegel.dar...@gmail.com wrote: The one case that hasn't been mentioned is when one dynamically creates transient images on the server. We transform various XML data sources into

Re: Loading Images into GWT via MySQL

2009-03-13 Thread Zé Vicente
Hi, I will give you my honestly opinion. It seems that you are new on the subject and I can say that I have a lot of experience on that. First of all, don't store images on the database :) It is true that we can do it, but depending of what you are going to do, the site of your database will

Re: Loading Images into GWT via MySQL

2009-03-13 Thread stone
use a servlet url for downloading img. for example: myapp/dbimage/123456 and the servlet mapping is /dbimage/* On Mar 13, 9:52 am, Itamar Ravid itamar.ira...@gmail.com wrote: Don't forget however to set the content type on the response to an image of some type, otherwise the client's browser

Re: Loading Images into GWT via MySQL

2009-03-13 Thread Magius
I stored images in the filesystem. At the client code, I use image1.setURL( /servlet/...) as 'stone' describes above. An HttpServlet receive it and sends the image (resized in my case). It performs well. On Mar 13, 10:08 am, stone stones...@gmail.com wrote: use a servlet url for downloading

Re: Loading Images into GWT via MySQL

2009-03-13 Thread gregor
+1 to Ze's comment My reply assumed you had a reason why you *must* store images in DB. If you don't Ze is right that it is a very inefficient way to store and serve images. On Mar 13, 9:04 am, Zé Vicente josevicentec...@gmail.com wrote: Hi, I will give you my honestly opinion. It seems

Re: Loading Images into GWT via MySQL

2009-03-13 Thread fatjack1...@googlemail.com
Ok, Thanks for all your replies. So which folder should I store the images in? Here is my current folder structure: -bin -src -temp -tomcat -WWW On Mar 13, 10:47 am, gregor greg.power...@googlemail.com wrote: +1 to Ze's comment My reply assumed you had a reason why you *must* store images

Loading Images into GWT via MySQL

2009-03-12 Thread fatjack1...@googlemail.com
Hi, I am new to loading images into GWT from MySQL and am abit lost on the best way to do it. I already have my image in the database. How do I retrieve it? I read somewhere that it can just be stored as a String. Is this correct? So my code on the server side would look like: //Open database

Re: Loading Images into GWT via MySQL

2009-03-12 Thread Itamar Ravid
The best way, IMO, is to not use GWT-RPC, but rather implement an HttpServlet, that retrieves the data from the database and returns it with the appropriate Content-Type in response to a GET http request. Then, you simply place an image in your GWT code, with its source being the path to the

Re: Loading Images into GWT via MySQL

2009-03-12 Thread fatjack1...@googlemail.com
Hi, I'm not too sure how to implement a HTTPServlet. Does anyone know how to use images using RPC? Im really stuck on this. On Mar 12, 8:43 pm, Itamar Ravid itamar.ira...@gmail.com wrote: The best way, IMO, is to not use GWT-RPC, but rather implement an HttpServlet, that retrieves the data