Usually you do not provide the Servlet API yourself. This is typically provided by the target servlet container itself. Examples of Servlet 3.0 compatible containers: Tomcat 7.x , Glassfish 3.x , JBoss AS 6.x / 7.x and, yes, Jetty 8.x.
You just need to declare the root element of the <web-app> web.xml to match the highest version supported by the target container.
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> </web-app>
See also:
source share