Storing images in SQL BLOBs

2005-09-06 Thread Murray Collingwood
Hi all I got my app storing and retrieving images from MySQL database - what a mistake! A simple image of 130k took 8 seconds to appear on the page. This is a huge time to sit and stare at a large blank space on the screen. I can't help thinking that this is a bug (performance problem)

Re: Storing images in SQL BLOBs

2005-09-06 Thread Murray Collingwood
Hi all (Gosh, I'm starting to feel like a regular on this list...) After my experiences below I have rewritten my application to store the images in a local sub-directory, however when I ran this new version the sub-directory was created under the Tomcat/bin directory - not really

Re: Storing images in SQL BLOBs

2005-09-06 Thread Jason Lea
I guess it depends if you are trying to restrict access to these images. To make all images available for anyone, put them into /images, for example. If you want to not allow any direct access to them, you could create a directory under /WEB-INF and put them there. You would then have to

Re: Storing images in SQL BLOBs

2005-09-06 Thread Murray Collingwood
How do I find the path actual path to /images assuming of course that /images is a url reference? Is there something like $STRUTS_ROOT? Kind regards mc On 7 Sep 2005 at 14:50, Jason Lea wrote: I guess it depends if you are trying to restrict access to these images. To make all images

Re: Storing images in SQL BLOBs

2005-09-06 Thread Jason Lea
Oh right, you need to discover the location automatically. Something like this might work: request.getSession().getServletContext().getRealPath(/images); That should give you the full path to /images. Murray Collingwood wrote: How do I find the path actual path to /images assuming of

Re: Storing images in SQL BLOBs

2005-09-06 Thread Murray Collingwood
Thanks Jason I'm having a strange issue with serving up these images. I'm getting a socket write error from the following code. There are 3 images, the details follow the code. The first two images appear, the third fails to appear. response.setContentLength((int)

Re: Storing images in SQL BLOBs

2005-09-06 Thread amos
On Wed, 2005-09-07 at 14:16 +1000, Murray Collingwood wrote: Thanks Jason I'm having a strange issue with serving up these images. I'm getting a socket write error from the following code. There are 3 images, the details follow the code. The first two images appear, the third fails