开发者

Image Upload Servlet not working in Chrome, but works in other browsers

开发者 https://www.devze.com 2022-12-22 01:44 出处:网络
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?

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


I suspect that the following line was missing:

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

Some browsers may namely be picky on that.

0

精彩评论

暂无评论...
验证码 换一张
取 消