是否可以在eclipse运行时环境中定义jetty服务器? [英] Is it possible to define jetty server in eclipse runtime environment?
问题描述
我已经使用eclipse WTP创建了一个REST WS应用程序。到目前为止,我正在使用Tomcat 7部署我的应用程序。我可以将Tomcat定义为Server运行时环境。现在我想使用jetty来部署该应用程序,我下载了jetty 8,并且我有eclipse Indigo ..试图定义jetty的方式,我做了Tomcat,但它没有工作,因为可用的适配器是为jetty6,当我尝试运行我的应用程序使用这个适配器,我收到一条消息说服务器不支持版本3.0的J2EE Web模块规范
I have created a REST WS application using eclipse WTP. So far, I was using Tomcat 7 to deploy my application. I could define Tomcat into Server runtime environments. Now i want to use jetty for to deploy that application, I downloaded jetty 8 and I have eclipse Indigo .. tried to define jetty the way i did for Tomcat but it did not work because the available adapter is for jetty6 and when I try to run my application using this adapter, I get a message saying the server does not suport version 3.0 of J2EE Web module specification
如何在eclipse上运行我的应用程序?
How can I run my application on jetty from eclipse?
推荐答案
jetty 6仅支持jsp / servlets 2.5 规范,所以你需要使用jetty8与servlets / jsp 3.0支持
jetty 6 supports only jsp/servlets 2.5 specification, so you need to use jetty8 with servlets/jsp 3.0 support
使用maven添加jetty 8像这样
use maven to add jetty 8 like this
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty.revision}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>${jetty.revision}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.revision}</version>
</dependency>
其中jetty版本是例如这个
8.1.5.v20120716
where jetty version is for example this one 8.1.5.v20120716
这篇关于是否可以在eclipse运行时环境中定义jetty服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!