You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ericdev <er...@zbe.com> on 2001/07/07 00:14:06 UTC

singleton instantiation through generic servlet

Hello,
  I tried to do a Singleton Instance of a class containing a Hashmap of entried mapping IPs to session objects to be used later for session invalidation. I instantiate the singleton instance with a generic servlet, but I dont think it worked when I started the server because I didnt see my println message when I started the server, and I can when I call the servlet explicitly. How do I know if I correctly setup the servlet to startup when the server starts?

Also, having a singleton instance, do I still need to import the class in the jsp page I use it in? Should it find it anyways if I dont? 

Also, when I do put it in the import, for some reason the singleton instance is intantiated twice in different JSP pages, thus furthering my belief that this class was created possibly in the first JSP page and discarded, then recreated in the second JSP page. Somebody help, This is getting ridiculous I originally tried this with application scope but it couldnt find the instance in another jsp page though it was in the same application.


Warmest Regards,
Eric Dunn
Software Engineer
ericdev@zbe.com