用jetty搭建websocket服务并与ie78兼容的方法
jetty8中已经自带有websocket功能,所以我们可以很方便搭建一个自己的websocket服务。 源程序: http://sdrv.ms/N5BuKw 启动类:org.noahx.websocket.WebSocketServer 访问地址: http://127.0.0.1:8085/test.html 1、外部依赖包如下(maven) <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.noahx</groupId> <artifactId>ws-test</artifactId> <version>1.0</version> <properties> <jetty.version>8.1.5.v20120716</jetty.version>