标签:
Version: 9.2.14.v20151106 |
Jetty : 开发文档 |
Version | Year | Home | JVM | Protocols | Servlet | JSP | Status |
---|---|---|---|---|---|---|---|
9.3 | 2014 | Eclipse | 1.7 | HTTP/1.1, HTTP/2 RFC2616,javax.websocket, SPDY v3 | 3.1 | 2.3 | Experimental |
9.2 | 2014 | Eclipse | 1.7 | HTTP/1.1 RFC2616,javax.websocket, SPDY v3 | 3.1 | 2.3 | Stable |
8 | 2009- | Eclipse/Codehaus | 1.6 | HTTP/1.1 RFC2616, WebSocket RFC 6455, SPDY v3 | 3.0 | 2.2 | Mature |
7 | 2008- | Eclipse/Codehaus | 1.5 | HTTP/1.1 RFC2616, WebSocket RFC 6455, SPDY v3 | 2.5 | 2.1 | Mature |
6 | 2006-2010 | Codehaus | 1.4-1.5 | HTTP/1.1 RFC2616 | 2.5 | 2.0 | Venerable |
5 | 2003-2009 | Sourceforge | 1.2-1.5 | HTTP/1.1 RFC2616 | 2.4 | 2.0 | Deprecated |
4 | 2001-2006 | Sourceforge | 1.2, J2ME | HTTP/1.1 RFC2616 | 2.3 | 1.2 | Ancient |
3 | 1999-2002 | Sourceforge | 1.2 | HTTP/1.1 RFC2068 | 2.2 | 1.1 | Fossilized |
2 | 1998-2000 | Mortbay | 1.1 | HTTP/1.0 RFC1945 | 2.1 | 1.0 | Legendary |
1 | 1995-1998 | Mortbay | 1.0 | HTTP/1.0 RFC1945 | - | - | Mythi |
JSR | Name | Included with jetty-9.1.x | Pluggable |
---|---|---|---|
JSR 340 | Servlet Specification API 3.1 | Yes | |
JSR 344 | Java Server Faces 2.2 (JSF) | No | Yes, Mojarra or MyFaces |
JSR 245 / JSR 341 | Java Server Pages 2.3/Java Expression Language 3.0 (JSP/EL) | Yes | Yes |
JSR 52 | Java Standard Tag Library 1.2 (JSTL) | Yes | Yes |
JSR 45 | Debugging Support for Other Languages 1.0 | Yes (via JSP) | Yes (via JSP) |
JSR 346 | Contexts and Dependency Injection for the JavaEE Platform 1.1 (Web Beans) | No | Yes, Weld |
JSR 330 | Dependency Injection for Java 1.0 | No | Yes as part of a CDI implementation, Weld |
JSR 316 | Managed Beans 1.0 | No | Yes, as part of another technology |
JSR 345 | Enterprise JavaBeans 3.2 Lite | No | |
JSR 338 | Java Persistance 2.1 (JPA) | No | Yes, eg Hibernate |
JSR 250 | Common Annotations for the Java Platform 1.2 | Yes | Partially (for non-core Servlet Spec annotations) |
JSR 907 | Java Transaction API 1.2 (JTA) | Yes | Yes |
JSR 349 | Bean Validation 1.1 | No | Yes as part of another technology eg JSF, or a stand-alone implementation such as Hiberate Validator |
JSR 339 | Java API for RESTful Web Services 2.0 (JAX-RS) | No | |
JSR 356 | Java API for Websocket 1.0 | Yes | No |
JSR 353 | Java API for JSON Processing 1.0 (JSON-P) | No | Yes, eg JSON-P reference implementation |
JSR 318 | Interceptors 1.2 | No | Yes as part of a CDI implementation |
JSR | Name | Included with jetty-9.0.x | Pluggable |
---|---|---|---|
JSR 315 | Servlet Specification API 3.0 | Yes | |
JSR 314 | JavaServer Faces 2.0 (JSF) | No | Yes, for example, Mojarra or MyFaces |
JSR 245 | JavaServer Pages 2.2/Java Expression Language 2.2 (JSP/EL) | Yes | Yes |
JSR 52 | Java Standard Tag Library 1.2 (JSTL) | Yes | Yes |
JSR 45 | Debugging Support for Other Languages 1.0 | Yes (via JSP) | Yes (via JSP) |
JSR 299 | Contexts and Dependency Injection for the Java EE Platform 1.0 (Web Beans) | No | Yes, Weld or OpenWebBeans |
JSR 330 | Dependency Injection for Java 1.0 | No | Yes as part of a CDI implementation, Weld |
JSR 316 | Managed Beans 1.0 | No | Yes, as part of another technology. |
JSR 318 | Enterprise JavaBeans 3.1 | No | Yes, OpenEJB |
JSR 317 | Java Persistance 2.0 (JPA) | No | Yes, Hibernate |
JSR 250 | Common Annotations for the Java Platform | Yes | Partially (for non-core Servlet Spec annotations) |
JSR 907 | Java Transaction API (JTA) | Yes | Implementations are pluggable, such as Atomikos, JOTM, Jencks (Geronimo Transaction Manager) |
JSR 303 | Bean Validation 1.0 | No | Yes as part of another technology (JSF), or a stand-alone implementation such as Hiberate Validator |
JETTY_HOME
或者作为 $(jetty.home)
Location | Description |
---|---|
license-eplv10-aslv20.html | Jetty的License文件 |
README.txt | 有用的开始信息 |
VERSION.txt | 版本信息 |
bin/ | 存放帮助Jetty Unix系统上运行实用的shell脚本 |
demo-base/ | Jetty的基本目录,用来运行在Jetty服务器示例应用程序 |
etc/ | Jetty相关的XML配置文件目录文件 |
lib/ | 运行Jetty相关的jar包 |
logs/ | 请求日志的目录 |
modules/ | 模块的目录 |
notice.html | License信息 |
resources/ | 此目录需要加载到classpath下额外的资源(激活配置有效) |
start.d/ | 存放ini文件的目录,存放有效的命令行参数(比如 start.ini) |
start.ini | 文件包含了参数信息 |
start.jar | 启动jetty的可执行jar |
webapps/ | web应用程序的存放目录 |
cd 你的jetty解压缩的目录 java -jar start.jar
然后在浏览器中输入http://localhost:8080进行访问。
在Jetty 9.1之后,jetty分发包里面是不带任何示例的web应用程序,所以为了查看有趣的web示例应用程序,你应该在demo-base目录下面运行下面的命令:
> cd jetty解压缩文件夹/demo-base/ > java -jar ../start.jar 2016-02-24 13:56:35.939:WARN::main: demo test-realm is deployed. DO NOT USE IN PRODUCTION! 2016-02-24 13:56:35.943:INFO:oejs.Server:main: jetty-9-demo 2016-02-24 13:56:35.976:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/home/user/jetty-distribution-9/demo-base/webapps/] at interval 1 2016-02-24 13:56:36.240:INFO:oejpw.PlusConfiguration:main: No Transaction manager found - if your webapp requires one, please configure one. 2016-02-24 13:56:36.732:WARN::main: async-rest webapp is deployed. DO NOT USE IN PRODUCTION! [...] 2016-02-24 13:56:38.572:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@2757052e{/,file:/home/user/jetty-distribution-9/demo-base/webapps/ROOT/,AVAILABLE}{/ROOT} 2016-02-24 13:56:38.579:INFO:oejs.ServerConnector:main: Started ServerConnector@19e0cb78{HTTP/1.1}{0.0.0.0:8080}
同样在浏览器中输入http://localhost:8080进行访问,将会显示欢迎页面和几个demo/test的应用。
提示:web示例应用程序并不提供必要的安全措施,请不要发布到生产环境中。
创建一个新的Jetty Base
在Jetty 9中demo-base
目录就是一个基于jetty.base机制的例子,一个jetty.base允许配置文件和相关的服务器实例在jetty分发包中单独保存。以便用最小的损失升级。Jetty默认的配置基于两个相关的属性配置。
1.jetty.home
他配置的属性有jetty本地的分发包、默认的模块、默认的xml文件(典型的有 start.jar, lib, etc)
他配置的属性有本地Jetty定义的实例,配置,日志和web应用程序(典型的有 start.ini, start.d, logs and webapps)
标签:
原文地址:http://www.cnblogs.com/liujie037/p/5215261.html