Samuli Elomaa wrote: > Hi, > Is there any otherway for two servlets in same tomcat to communicate > together except by http requests? Eg. could two servlets use somekind > of shared memory? or send signals to each other?
Hi, whatever others suggested, just use the Servlet Spec 2.3+ standard: The webapp context scoped shared memory is here: http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/ServletContext.html#setAttribute(java.lang.String,%20java.lang.Object) http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/ServletContext.html#getAttribute(java.lang.String) The event listener is here: http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/ServletContextAttributeListener.html Singletons are evil, even more devilish for webapps. ;-) Cheers, Michael --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]