diff options
author | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-27 03:46:47 -0200 |
---|---|---|
committer | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-27 03:46:47 -0200 |
commit | 1a25796d62bdf88f2cba0387a09e2eb71599e588 (patch) | |
tree | 532c32341faa343eb03fc45eced9b0a6cd0df4dd /src/org/traccar/web | |
parent | ca06e8d38c0bbd5a68e63ebada8e115da252b055 (diff) | |
download | trackermap-server-1a25796d62bdf88f2cba0387a09e2eb71599e588.tar.gz trackermap-server-1a25796d62bdf88f2cba0387a09e2eb71599e588.tar.bz2 trackermap-server-1a25796d62bdf88f2cba0387a09e2eb71599e588.zip |
Merge tananaev/master
Conflicts:
src/org/traccar/web/WebServer.java
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r-- | src/org/traccar/web/WebServer.java | 9 |
1 files changed, 9 insertions, 0 deletions
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(); |