From 1a25796d62bdf88f2cba0387a09e2eb71599e588 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Date: Fri, 27 Nov 2015 03:46:47 -0200 Subject: Merge tananaev/master Conflicts: src/org/traccar/web/WebServer.java --- src/org/traccar/web/WebServer.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/org') diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java index 0f9bf8181..2318c4151 100644 --- a/src/org/traccar/web/WebServer.java +++ b/src/org/traccar/web/WebServer.java @@ -128,6 +128,15 @@ public class WebServer { handlers.addHandler(servletHandler); } + private void initRestApi() { + ResourceConfig resourceConfig = new ResourceConfig(); + resourceConfig.packages("org.traccar.api"); + ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS); + ServletHolder servletHolder = new ServletHolder(new ServletContainer(resourceConfig)); + servletHandler.addServlet(servletHolder, "/rest/*"); + handlers.addHandler(servletHandler); + } + public void start() { try { server.start(); -- cgit v1.2.3