我正在使用 Jetty 8(稳定),JDK 1.7。Eclipse Luna 最新。
我是使用 Jetty 和 Java 的新手,我正在尝试运行教程中提供的示例代码(链接到教程)
但我收到以下错误:
2015-06-24 10:52:03.208:WARN:oejuc.AbstractLifeCycle:FAILED
org.eclipse.jetty.server.handler.HandlerCollection@6be3fe1e: java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspApplicationContextImpl Java.lang.NoClassDefFoundError:org/apache/jasper/runtime/JspApplicationContextImpl
我签入了我的 Maven 存储库,那里不存在此文件夹。我以为这个文件夹会自动创建。但是在多次运行 clean build 后,我得到了同样的错误。
我是否需要手动创建此文件夹然后我应该重试或由于其他原因。请指导我正确的方向。
以下是我的 pom.xml:
<properties>
<jetty-version>8.1.1.v20120215</jetty-version>
</properties>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty-version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- This plugin is needed for the servlet example -->
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution><goals><goal>java</goal></goals></execution>
</executions>
<configuration>
<mainClass>org.example.HelloWorld</mainClass>
</configuration>
</plugin>
</plugins>
</build>
谢谢