Modified for use with tomcat