日志:INFO: JSR 356 WebSocket (Java WebSocket 1.1) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocket JARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available.
解决:打开tomcat的配置目录/etc/tomcat,找到catalina.properties文件这么一行:
org.apache.catalina.startup.TldConfig.jarsToSkip=tomcat7-websocket.jar
注释掉重启即可
但是tomcat7和java6连接mysql,也会出现一些报错,例如:
SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
SEVERE: The web application [] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
所以,可以的话,tomcat7不要和java6一起使用,把java6换成java7吧。