File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Issue with Servlet Listener Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Issue with Servlet Listener Class" Watch "Issue with Servlet Listener Class" New topic

Issue with Servlet Listener Class

Christian Maurer

Joined: Jan 17, 2013
Posts: 1
Hello guys,

I am new here and I have a question regarding the servlet listener class. I have been debugging code now the second day and I am not having a clue. I am working with Netbeans, Maven and Hibernate and I try to set up a Versioning, which should be executed when the application is initialized. Therefore I have used the following web.xml:

Now, when I start my Tomcat server and deploy the war file, the Versioning (VersioningDAOImpl, which implements ServletContextListener) is not started. I had the idea that I might have a typing mistake, but then I realized the following: Whenever I change the web.xml file, the application gets redeployed by the IDE. Once the application is redeployed, the VersioningDAOImpl is executed (which means that there is no typo). Also, once the code gets executed (on redeployment) the code runs without exceptions. So what am I doing wrong?

Thanks for your help!
subject: Issue with Servlet Listener Class
It's not a secret anymore!