<?xml version="1.0" encoding="utf-16"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>Coflight</servlet-name>
<servlet-class>org.codeliners.coflight.Coflight</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Coflight</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
我的上下文xml就是这个:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/coflight</Set>
<Set name="war">/mnt/K/coding/JCoflight/out/artifacts/JCoflight_war/Coflight.war</Set>
</Configure>
战争中的文件结构:
\ WEB-INF
+ classes
| \ org
| \ codeliners
| ... (you get the point)
\ web.xml
解决:我不知道为什么,但重新启动Jetty就像第十次修复它一样