版本 | Java | HTTP | Servlet | JSP | Status | Notes |
---|---|---|---|---|---|---|
Jetty -8 eclipse | 1.6 - | HTTP/1.1 RFC2616 | 3.0 | 2.2 | Development | Standardized async |
Jetty -7 eclipse | 1.5- | HTTP/1.1 RFC2616 | 2.5 | 2.1 | Almost stable | org.eclipse.jetty |
Jetty -6 .1 | 1.4-1.6 | HTTP/1.1 RFC2616 | 2.5 | 2.1 or 2.0 | Stable | Async SSL, AJP, cometd, testing |
Jetty -6 | 1.4-1.5 | HTTP/1.1 RFC2616 | 2.5 | 2.1 or 2.0 | Deprecated | Continuations, IOC, NIO, dynamic buffers, smaller, faster, better |
Jetty -5.1 | 1.2-1.5 | HTTP/1.1 RFC2616 | 2.4 | 2.0 | Stable | J2EE 1.4 Compliance tested, optimizations, geronimo integration. |
Jetty -5.0 | 1.2-1.4 | HTTP/1.1 RFC2616 | 2.4 | 2.0 | Deprecated | Schema, JettyPlus |
Jetty -4.2 | 1.2-1.4 | HTTP/1.1 RFC2616 | 2.3+ | 1.2 | Mature | JettyPlus |
Jetty -4.1 | 1.2-1.4 | HTTP/1.1 RFC2616 | 2.3 | 1.2 | Deprecated | JAXP1.1, AJP13(mod_jk) |
Jetty -4.0 | 1.2 | HTTP/1.1 RFC2616 | 2.3 | 1.2 | Deprecated | |
Jetty -3.1 | 1.2 | HTTP/1.1 RFC2068 | 2.2 | 1.1 | Ancient | JMX |
Jetty -3.0 | 1.2 | HTTP/1.1 RFC2068 | 2.2 | 1.1 | Fossilized | |
Jetty -2.4 | 1.1 | HTTP/1.0 RFC1945 | 2.1 | 1.0 | Legendary | |
Jetty -1.0 | 1.0 | HTTP/1.0 RFC1945 | - | - | Mythical |
java -jar start.jar etc/jetty .xml
我们看到上条命令指定参数内容为etc/jetty .xml,它实际指向一个 服务配置文件 ,该文件是用来设置jetty 服务启动的系统配置信息。比如监听端口,发布某个目录下面的web应用,jndi的配置等等,这些将在后续章节详细描述。当然 服务配置文件 可以是多个,比如:
java -jar start.jar etc/jetty .xml etc/jetty -plus.xml
这条命令就指定了两个 服务配置文件 ,etc/jetty .xml和etc/jetty -plus.xml。
java -DSTOP.PORT=8009 -DSTOP.KEY=secret -jar start.jar
jetty 启动后会在本地监听你指定的端口8009,并将在验证下次关闭命令的密码secret。现在再通过命令:
java -DSTOP.PORT=8009 -DSTOP.KEY=secret -jar start.jar --stop
就可以在本机的另外一个终端窗口来停止jetty 服务。在linux系统中,你可以先将jetty 进程转移到后台执行,然后再通过命令行来停止Jetty 服务。
$(jetty .class.path).path always
$(jetty .lib)/** exists $(jetty .lib)
# Try different settings of jetty .home until the jetty .jar is found.
jetty .home=. ! exists $(jetty .home)/start.jar
jetty .home=.. ! exists $(jetty .home)/start.jar
jetty .home=/home/jetty ! exists $(jetty .home)/start.jar
jetty .home=/C:/jetty ! exists $(jetty .home)/start.jar
jetty .home=. ! exists $(jetty .home)/start.jar
# The main class to run
org.mortbay.xml.XmlConfiguration.class
$(start.class).class
# The default configuration files
$(jetty .home)/etc/jetty .xml nargs == 0
# Set the jetty classpath
$(jetty .home)/lib/* always
# Set the classpath for the supporting cast
$(jetty .home)/lib/jsp-2.1/* java >= 1.5
$(jetty .home)/lib/jsp-2.0/* ! available org.apache.jasper.servlet.JspServlet
$(jetty .home)/lib/management/*
$(jetty .home)/lib/management/mx4j/* java < 1.5
$(jetty .home)/lib/naming/*
$(jetty .home)/lib/plus/*
$(jetty .home)/lib/xbean/*
$(jetty .home)/lib/wadi/*
$(jetty .home)/lib/grizzly/*
$(jetty .home)/lib/annotations/* java >= 1.5
$(jetty .home)/lib/jre1.5/** java >= 1.5
# Recursively add all jars and zips from the ext lib
$(jetty .home)/lib/ext/** always
# Try some standard locations for anything missing.
/usr/share/java/ant.jar ! available org.apache.tools.ant.Main
# Add a resources directory if it is there
$(jetty .home)/resources/
|
wrapper.java.classpath.1=../lib/win32/*.jar
启动jetty 服务
停止jetty 服务
supervise
挂起服务
如果不存在该文件,jetty .sh将会使用默认值 :
“ ${JETTY_HOME}/etc/jetty -logging.xml ${JETTY_HOME}/etc/jetty .xml ”
若任何一个文件存在,那么jetty .sh文件执行时都会执行它。我们可以在这些文件中配置系统变量。