不少討論關於 tomcat與jetty,我的以爲他們各有所長,jetty的較小巧,tomcat屬性較重量級,jetty更容易被二次開發定製,tomcat還有個遠程部署界面呢,jetty內存佔用小,tomcat很好搭建集羣啊等等 ,瞭解得不是很全面 ,只是以爲都還不錯。html
關於jetty,你想用哪一個版本?用哪一個jdk,能過下表可知java
Downloads | ||||||
stable-9: | .zip .tgz (all) | apidocs | xref | Stable (Java 8+) 9.3.8.v20160314 | ||
---|---|---|---|---|---|---|
9.3.8.v20160314: | .zip .tgz (all) | apidocs | xref | Release (Java 8+) | ||
9.3.7.v20160115: | .zip .tgz (all) | apidocs | xref | Release (Java 8+) | ||
9.2.15.v20160210: | .zip .tgz (all) | apidocs | xref | Release (Java 7+) | ||
9.2.14.v20151106: | .zip .tgz (all) | apidocs | xref | Release (Java 7+) | ||
8.1.17.v20150415: | .zip .tgz (all) | apidocs | xref | Release (EOL) | ||
7.6.17.v20150415: | .zip .tgz (all) | apidocs | xref | Release (EOL) |
咱們這裏用9.2.15 http://download.eclipse.org/jetty/9.2.15.v20160210/dist/jetty-distribution-9.2.15.v20160210.tar.gzlinux
jdkapi
這裏用的是1.7u55 ,linux下載的路徑 有點特殊,直接執行下面這一段吧~tomcat
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2F%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.tar.gz"cookie
安裝:oracle
jetty安裝:下載後解壓就和地。eclipse
jetty啓動:啓動以前請配置好jdk。參照這個 http://www.cnblogs.com/samcn/archive/2011/03/16/1986248.htmlurl
去到${jetty_home}/bin ,啓動 sh jetty.sh startspa
若是jenkins集成呢,這裏只說明jetty的配置,爲其集成作準備,啓動腳本參見:
http://www.oschina.net/code/snippet_2553994_55719
若是隻是簡將項目作成根項目: