Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue with Servlet Listener Class  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!