java - Embedded Jetty is running with old version of servlets API -


my embedded jetty has following file @ /home/user/desktop/jetty-web.xml:

<web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"  xmlns="http://java.sun.com/xml/ns/javaee"  xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com /xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0"/> 

i start server following code:

    server server = new server();   selectchannelconnector connector = new selectchannelconnector();         connector.setport(serverconfig.port);         connector.setmaxidletime(serverconfig.max_idle_time);         connector.setrequestheadersize(serverconfig.request_header_size);         server.setconnectors(new connector[]{connector});  webappcontext webappcontext = new webappcontext(); webappcontext.setdescriptor("/home/user/desktop/jetty-web.xml"); webappcontext.setbaseresource(resource.newresource("/"));         webappcontext.setcontextpath("/");  //add few servlets...  server.sethandler(webappcontext);  server.start(); 

my intention run servlet api 3.0. when compile jetty part of project works fine. however, when add external library uses older version of jetty(hadoop core) embedded jetty server downgrades 2.5 , throws nosuchmethoderror on httprequest#getparts call. how can force jetty server run java servlets 3.0?

i'm using jetty 8.1.16.v20140903.

if using build tool, exclude jetty , servlet-api pieces hadoop dependencies.

simply sure don't use old versions of jetty.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -