updated listener for tomcat