views:

165

answers:

1

I have tested this servlet and it works well, except in Google Chrome it jsut doesn't display image. What could be wrong in this example code that makes Chrome not to display image?

http://balusc.blogspot.com/2007/04/imageservlet.html

+1  A: 

I suspect that the following line was missing:

response.setHeader("Content-Length", String.valueOf(image.length()));

Some browsers may namely be picky on that.

BalusC