ContextHandler context = new ContextHandler();
context.setContextPath("/");
final ServletContext servletContext = context.getServletContext();
server.setHandler(context);
Handler handler = new AbstractHandler() {
public void handle(String target, HttpServletRequest req, HttpServletResponse res, int dispatch) throws IOException, ServletException {
try {
((Request) req).setHandled(true);
HttpRequest httpRequest = new ServletRequestAdapter(req, res, servletContext);
HttpResponse httpResponse = new ServletResponseAdapter(res);