Discussions

Web tier: servlets, JSP, Web frameworks: Register a Listener without web.xml

  1. Register a Listener without web.xml (3 messages)

    Hi, I want to register a ServletContextListener. But I can't use a web.xml for that. How can I do that? Can anybody help me, please! Best regards, Sabine
  2. Why can't you use web.xml?
  3. Re: Register a Listener without web.xml[ Go to top ]

    Probabaly you are trying to solve one problem with another problem. If your config manager does not allow you to register listeners for some clean up activity then you can keep them in jsp/servlet destroy methods. IN case you like some startupactivity to be sone then use your inits. I believe this can solve what your context listers can without registering anything in web.xml. Just a wild thought... Biswaranjan Das
  4. Re: Register a Listener without web.xml[ Go to top ]

    I agree with the person who started the thread, even i want to develop a servlet context listener which would be instantiated with out registering it in the web.xml. See how the sun people did it, if you want to set up sun jsf ri then in your web.xml u donot provide that it is sun refernce implementation how ever the sun reference impplementation gets picked up I am still not able to understand how these people made it work. Now comming to usage if we can achieve this then it would be very helpful to people , as they need not have to configure the third party softwares their servletContext would be listen and it would take care from there on wards. It is a very important trick to learn for writing smart softwares. -Souravmay Das