Originally posted by Ali Gohar:
Still not understood
do you want to read the image file in form of byte[]?
Originally posted by Ali Gohar:
From where do you want to read the image? From File or From Database?
Originally posted by Nathaniel Stoddard:
Dhanashree,
Do you mean that you want the Servlet's generated results to be cached in the client's browser so it is loaded faster next time it is accessed? Or do you mean that you want the Servlet to be loaded into the web container initially so that the very first time it is accessed the client doesn't have to wait while the ClassLoader finds the resource and loads it all into memory?
If you wanted the first thing, and your Servlet is generating an image, there are various ways to precache images. I would suggest you search the Integer for various solutions. I'm going to assume that you want the second solution. In that case there is an auto-load deployment descriptor you can use to achieve what you want:
Does that answer your question?