You normally don't provide the Servlet API yourself. This is normally to be provided by the target servletcontainer itself. Examples of Servlet 3.0 compatible containers are Tomcat 7.x, Glassfish 3.x,JBoss AS 6.x/7.x and, yes, Jetty 8.x.
You just have to declare the
<web-app>
root element of web.xml
to comply the highest version as 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:
Read full article from Can I use servlet api 3.0 and jetty 8? - Stack Overflow
No comments:
Post a Comment