This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hi, I have a question on ImageObserver in servlets. Why is it sometimes we need to create the ImageObserver on the class level and other times as a local variable of doGet()? What is the difference? Thanks!
The obvious difference is that a local variable should only exist for the duration of the request-response cycle, whereas an instance variable will hang around for the life of the servlet object. I'm really curious as to what you are doing that needs an ImageObserver at all? When I need to load an Image into a servlet I use a MediaTracker. Bill