fix distinct behavior between tomcat and jetty