开发者

Loading multiple images to jsp from DB

开发者 https://www.devze.com 2023-01-30 17:55 出处:网络
I am retrieving multiple images from database (blob) and loading it to jsp using <img src=\"www.xyz.com?img=123\">.

I am retrieving multiple images from database (blob) and loading it to jsp using <img src="www.xyz.com?img=123">.

All 'src' of <img> go to servlet and get the blob image and is outpu开发者_运维问答tted using response.getOutputStream().write(). Since there are some 8 to 10 images, the websphere server crashes.

Any idea?

Can we store these images (after getting from DB) in some temporary folder and the configure the temporary path in server and load these images using <img>?


That's look very strange if your application server crashes. Check if you close database connection, and streams like response.getOutputStream() . It's more than 10 times faster if you store images in folder, let say, configure img folder in web server like Apache, and write image to /img/image_id

0

精彩评论

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