This content has been marked as final.
Show 2 replies
-
1. Re: Dynamic images on JBOSS 3.0.4/Jetty
robhedin Feb 21, 2003 3:44 PM (in response to oagady)We do the following:
We've got graphics stored as a blob in an oracle database.
We create a servlet that can, given a mapping of some kind, look up the graphic in the db and returns it to the client.
Our anchors are then setup like:
picture
Our web app is deployed to the /webapp context above, and the servlet is mapped to /GetImage/*
The servlet gets the request, looks up the image in the db( from above, "imagename.gif"), sets the ContentType to "image/gif" (or whatever) and the content length, and returns the data stream to the client. No need to write anything to the filesystem at all.
Actually, we end up using an LRU caching system, to avoid hits to the DB (since our images really don't change once created).
rob. -