使用HTTPS协议
1) 生成证书
keytool -genkey -alias ying -keyalg RSA -validity 3650
<Connector port="8443"protocol="HTTP/1.1"SSLEnabled="true"maxThreads="150" scheme="https" secure="true"clientAuth="false"sslProtocol="TLS"keystorePass="yingzhor@163.com" />
<plugin><groupId>org.mortbay.jetty</groupId><artifactId>maven-jetty-plugin</artifactId><version>6.1.26</version><configuration><scanIntervalSeconds>20</scanIntervalSeconds><stopKey>foo</stopKey><stopPort>9999</stopPort><connectors><connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"><port>8080</port><maxIdleTime>60000</maxIdleTime></connector><connector implementation="org.mortbay.jetty.security.SslSocketConnector"><port>8443</port><maxIdleTime>60000</maxIdleTime><keystore>C:/Documents and Settings/zhuoying/.keystore</keystore><password>yingzhor@163.com</password><keyPassword>yingzhor@163.com</keyPassword></connector></connectors></configuration><executions><execution><id>start-jetty</id><phase>pre-integration-test</phase><goals><goal>run</goal></goals><configuration><scanIntervalSeconds>0</scanIntervalSeconds><daemon>true</daemon></configuration></execution><execution><id>stop-jetty</id><phase>post-integration-test</phase><goals><goal>stop</goal></goals></execution></executions><dependencies><dependency><groupId>org.mortbay.jetty</groupId><artifactId>jetty-sslengine</artifactId><version>6.1.26</version></dependency></dependencies></plugin>