What do you mean by the statement "source/address of the image and
send to de web via ajax
script"? Does it mean you'll manually send http request to the
address, get the image content on page, convert it into base64 and use
the above technique to display it? Or you'll add a new <img> tag with
given address? I think the latter is much better option. In fact, you
can have one img tag whose src attribute can be changed to point to
new address. Browser will automatically retrieve it in background and
display it. What say?
The latter option is good. i can use it as a last resort.
But I will describe a little more my case: I am designing an
application web with struts.
Well, I have a servlet that generate a graphic.
This servlet set the content-type to image and write in the response
de data raw. I don't need store that image in disk and moreover,
i request to this servlet asynchronously. For this reason, the latter
option, in spite of it is ok, isn't the better.
I would like to send the data raw and the browser will render it.
I can do this but with sincronous petition.
In the jsp page I have this tag: "<img src="showimage.do"/>
The server take charge of generate the image and assign it to the img
tag.
Then, it will send the html page rendered with the graphic embedded.
I want to do this but asincronously.
well, I don't know if you understood to me.
Thank you very much