-----Original Message----- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 24, 2007 10:03 AM To: Tag Libraries Users List Subject: Re: Virtual hosting and listener servlets
On 10/24/07, T. Lamine Ba <[EMAIL PROTECTED]> wrote: > Here it is. > > I use Tomcat 5.0.28. I also use the tomcat connector and apache to > listen on port 80 to domain names of my websites. Each website has a > virtual host configured in httpd.conf (apache) and server.xml (tomcat). > The configuration works great except for one thing. The tomcat > container is not able to execute my ResourceManagerListener servlet, > which is a class where I initialize all my application variables. The > class is referenced in the my webapp web.xml file as follows: > > <listener> > <listener-class> > servlets.ResourceManagerListener > </listener-class> > </listener> > > ResourceManagerListener is located under the directory > "<webapp>/WEB-INF/classes/servlets". When I do not use any virtual > hosting and I reference the website from the base directory, such as > http://www.mytomcatbase.com/mywebappfolder instead of > http://www.mywebapp.com , then every thing works. > > Please advise how I can specify a listener class in web.xml after a > virtual hosting configuration moves the container context. For clarification, which listener interface does ResourceManagerListener implement. I assume it would be ServletContextListener. *** indeed it implements ServletContextListener When you say, "not able to execute", what does that mean? Were exceptions thrown? Did the listener appear not to be loaded? *** Logs read "Error ListenerStart" + "Context startup failed" Have you tried running on TC 5.5.x? *** I do not have this flexibility. I use what my hosting company provides. > Thx, Lamine. -- Kris Schneider <mailto:[EMAIL PROTECTED]> directThought <http://www.directThought.com/> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]