adapt to tomcat 6