> From: Kevin Wilhelm [mailto:[EMAIL PROTECTED] > Subject: Re: Using shared Spring Webapp in Tomcat 6 > > I understand it makes no sense to share a whole webapp in Tomcat.
Still not clear on what you mean by "share a whole webapp". By definition (the servlet spec), webapps are intended to be independent and the interface to a webapp is via HTTP. You can easily send an HTTP request from one webapp to another within Tomcat, if that's what you want to do - but I suspect you really want to use method invocations. > What about sharing a singleton across all Tomcat webapps? That's fine, and it doesn't have to be in a jar - you can put just the .class file into the $CATALINA_HOME/lib directory. > How do I access the singleton from within my webapps after that? Just call it; the webapp's classloader will delegate to the common classloader if the reference can't be found within the webapp. > However, the first call must set the factory > (the main webapp will do that) You might want to consider using a Listener to initialize the singleton. Again, read the servlet spec. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]