-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Lyallex,
On 6/10/2009 1:10 PM, Lyallex wrote: > <img src="ImageProxy?<%=WebConstants.IMAGE_ID%>=<%=p.calculateImageId()%>... > etc '/> > > This gets the image from the database and displays it in the page. > > This is clunky and slow and the image is not cached by the browser You might want to set some caching headers, etc. if you want the browser to cache the image. You'll have the same problem with locally-cached files if you don't do this (DefaultServlet, which it sounds like you're using, probably sets these headers appropriately). > Anyway, I'm currently looking at the serveResource() method in the > DefaultServlet... Multiple posts to this list seem to contradict Hassan's assertion that this should work: the DefaultServlet appears to ignore files that are created post deployment (or at least, post directory-read). This is either due to the servlet itself or the (IIRC) JNDI context used by the DefaultServlet to read the files. I would recommend serving the bytes using your own servlet rather than the DefaultServlet. That way, you free yourself from these apparent directory-caching issues, plus you can (more) easily move your image cache out of your deployment directory (if you care). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkowMzYACgkQ9CaO5/Lv0PBFhACdFH4WalukRH68QqDgwStOM5sm 4hMAnApwfMGuF2xUuXGOw2Z/7o9WFy2X =WUup -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org