tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Wingfield <>
Subject Re: application scope variable lost
Date Mon, 28 Jul 2003 17:43:43 GMT
Even though your Servlet is loaded on startup the container (ie tomcat) 
is free to unload and reload servlets at any time. This is why it is so 
much better (IMO) to use ServletContextListeners for application 
configuration. Does your servlet create empty maps even if they already 
exist on the context? If so, the behaviour you are seeing is probably a 
reload of your Servlet. (Weird that all 3 apps showed the same behaviour 
at the same time, though)


Vladimer Shioshvili wrote:
> I have three contexts running basically the same application. (one is 
> semi-production, and two sandboxes). All of them having bunch of hasmaps 
> in the application scope to use as a reference. there is only one 
> servlet per application that actually does writing to these hashmaps, 
> the rest of the pages/servlets only read the values. the servlet that 
> creates the hashmaps is loaded on startup and has no doGet, or doPost 
> methods. everything seemed fine until this morning out of blue i noticed 
> that all three contexts have empty hashmaps. they were fine earlier this 
> morning though.
> this is something i was not ready for.. any clues or suggestions what 
> could be the cause? any help is appreciated..
> thanks,
> Vlad
> ________________
> Vladimer Shioshvili
> QRC Division of Macro International Inc.
> 7315 Wisconsin Avenue, Suite 400W
> Bethesda, MD 20814
> Phone: (301) 657 3077 ext. 155
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message